NXDL Definition File Tree Structure : nxdltree

Describe the tree structure of a NeXus Definition Language NXDL XML file.

Note: The tree subcommand replaces the now-legacy structure subcommand.


source code documentation

Describe the tree structure of a NXDL XML file

NxdlTreeView(nxdl_file)

Describe the tree structure of a NXDL XML file

class punx.nxdltree.NxdlTreeView(nxdl_file)[source]

Describe the tree structure of a NXDL XML file

Example usage showing default display:

mc = NxdlTreeView(nxdl_file_name)
mc.array_items_shown = 5
show_attributes = False
txt = mc.report(show_attributes)
report(show_attributes=True)[source]

return the structure of the NXDL file in a list of strings

The work of parsing the data file is done in this method.

punx.nxdltree.xslt_transformation(xslt_file, src_xml_file)[source]

return the transform of an XML file using an XSLT

Parameters
  • xslt_file (str) – name of XSLT file

  • src_xml_file (str) – name of XML file