resqpy.olio.xml_etΒΆ
xml_et.py: Resqml xml element tree utilities module.
Functions
Returns boolean value for string 'true' or 'false'; anything else results in None. |
|
Looks for a citation node as a child of node and returns the title text. |
|
Returns a version of an xml tag with {url} prefix replaced with nsi: equivalent; also returns the nsi prefix. |
|
Returns the actual type, as embedded in an xml ContentType attribute; application and version are disregarded. |
|
Returns the number of children in xml node with a (prefix-stripped) tag matching given tag name. |
|
Writes the xml for the given metadata dictionary. |
|
Looks for a citation node as a child of node and returns the creation (date-time) text. |
|
Removes all the extra metadata children under root node. |
|
Deletes any nodes of a type matching one in the given list. |
|
Deletes any object reference nodes to uuids in given list. |
|
Returns the index in the ordered list-like array of value; or None if not present. |
|
Follows a list of tags in a nested xml hierarchy, returning the node at the deepest level. |
|
Return stripped text of node at deepest level of xml hierarchy as a bool. |
|
Return value of nested tags as desired dtype. |
|
Return stripped text of node at deepest level of xml hierarchy as a float. |
|
Return stripped text of node at deepest level of xml hierarchy as an int. |
|
Return stripped text of node at deepest level of xml hierarchy. |
|
Finds the first child in xml node with a (prefix-stripped) tag matching given tag name. |
|
Finds the first child in xml node with a tag matching given tag name; returns stripped text field as bool. |
|
Finds the first child in xml node with a tag matching given tag name; returns stripped text field as float. |
|
Finds the first child in xml node with a tag matching given tag name; returns stripped text field as int. |
|
Finds the first child in xml node with a tag matching given tag name; returns stripped text field. |
|
Returns ijk true handedness as 'left', 'right' or 'unknown'. |
|
Returns True if type of object is element tree node; False otherwise. |
|
Returns standard length units string based on node text, or 'unknown'. |
|
Returns list of nodes of type DataObjectReference. |
|
Returns a list of descendants in xml node tree with a (prefix-stripped) tag matching given tag name. |
|
Returns a list of children in xml node with a (prefix-stripped) tag matching given tag name. |
|
Loads the ExtraMetaData stored in a RESQML part as a dictionary. |
|
Returns True if the xml_name stripped of prefix matches name. |
|
Returns stripped node text as bool, or None. |
|
Returns stripped node text as float, or None. |
|
Returns stripped node text as int, or None. |
|
Returns stripped node text or 'unknown' if node is None or text is blank or newline. |
|
Returns the type as held in attributes of xml node; defining authority is stripped out. |
|
Returns the standard part name comprised of the object type, uuid and .xml extension. |
|
Returns the part name given the root node for the part's xml. |
|
Returns modified part name with uuid swapped to uuid argument; root attrib is also changed. |
|
Print an xml tree in an indented semi-readable format; return accumulated number of lines. |
|
Returns the paired relationships part name for the given part name. |
|
Returns a simplified string version of the elemental data type (typically for a numpy or hdf5 array). |
|
Returns the filename part of full_path with any directory path removed. |
|
Returns a simplified version of an xml tag or other str with any {xsd defining prefix} stripped off. |
|
Returns standard time units string based on node text, or 'unknown'. |
|
Returns uuid as stored in xml attribs for root. |
|
Returns uuid as embedded in part name. |
|
Write an xml tree to file in an indented format; gSOAP/FESAPI compatible; return number of nodes written. |
|
Recursively write an xml node to an open file; return number of nodes written. |
|
Return xyz true handedness as 'left', 'right' or 'unknown'. |