TiXI
3.3.0
|
Functions | |
DLL_EXPORT ReturnCode | tixiGetTextElement (const TixiDocumentHandle handle, const char *elementPath, char **text) |
Retrieve text content of an element. More... | |
DLL_EXPORT ReturnCode | tixiGetIntegerElement (const TixiDocumentHandle handle, const char *elementPath, int *number) |
Retrieve integer content of an element. More... | |
DLL_EXPORT ReturnCode | tixiGetDoubleElement (const TixiDocumentHandle handle, const char *elementPath, double *number) |
Retrieve floating point content of an element. More... | |
DLL_EXPORT ReturnCode | tixiGetBooleanElement (const TixiDocumentHandle handle, const char *elementPath, int *boolean) |
Retrieve boolean content of an element. More... | |
DLL_EXPORT ReturnCode | tixiUpdateTextElement (const TixiDocumentHandle handle, const char *elementPath, const char *text) |
Updates the text content of an element. More... | |
DLL_EXPORT ReturnCode | tixiUpdateDoubleElement (const TixiDocumentHandle handle, const char *elementPath, double number, const char *format) |
Updates the double content of an element. More... | |
DLL_EXPORT ReturnCode | tixiUpdateIntegerElement (const TixiDocumentHandle handle, const char *elementPath, int number, const char *format) |
Updates the double content of an element. More... | |
DLL_EXPORT ReturnCode | tixiUpdateBooleanElement (const TixiDocumentHandle handle, const char *elementPath, int boolean) |
Updates the boolean content of an element. More... | |
DLL_EXPORT ReturnCode | tixiAddTextElement (const TixiDocumentHandle handle, const char *parentPath, const char *elementName, const char *text) |
Creates an element holding text. More... | |
DLL_EXPORT ReturnCode | tixiAddTextElementNS (const TixiDocumentHandle handle, const char *parentPath, const char *qualifiedName, const char *namespaceURI, const char *text) |
Creates an element holding text within the given namespace. More... | |
DLL_EXPORT ReturnCode | tixiAddTextElementAtIndex (const TixiDocumentHandle handle, const char *parentPath, const char *elementName, const char *text, int index) |
Creates an element holding text at a given index. More... | |
DLL_EXPORT ReturnCode | tixiAddTextElementNSAtIndex (const TixiDocumentHandle handle, const char *parentPath, const char *qualifiedName, const char *namespaceURI, const char *text, int index) |
Creates an element holding text at a given index in the specified namespace. More... | |
DLL_EXPORT ReturnCode | tixiAddBooleanElement (const TixiDocumentHandle handle, const char *parentPath, const char *elementName, int boolean) |
Creates an element and sets the value to "true" or "false". More... | |
DLL_EXPORT ReturnCode | tixiAddBooleanElementNS (const TixiDocumentHandle handle, const char *parentPath, const char *qualifiedName, const char *namespaceURI, int boolean) |
Creates an element in the given namesoace and sets the value to "true" or "false". More... | |
DLL_EXPORT ReturnCode | tixiAddDoubleElement (const TixiDocumentHandle handle, const char *parentPath, const char *elementName, double number, const char *format) |
Creates an element which holds a floating point number. More... | |
DLL_EXPORT ReturnCode | tixiAddDoubleElementNS (const TixiDocumentHandle handle, const char *parentPath, const char *qualifiedName, const char *namespaceURI, double number, const char *format) |
Creates an element which holds a floating point number in the given namespace. More... | |
DLL_EXPORT ReturnCode | tixiAddIntegerElement (const TixiDocumentHandle handle, const char *parentPath, const char *elementName, int number, const char *format) |
Creates an element which holds an integer. More... | |
DLL_EXPORT ReturnCode | tixiAddIntegerElementNS (const TixiDocumentHandle handle, const char *parentPath, const char *qualifiedName, const char *namespaceURI, int number, const char *format) |
Creates an element which holds an integer in the given namespace. More... | |
DLL_EXPORT ReturnCode | tixiAddFloatVector (const TixiDocumentHandle handle, const char *parentPath, const char *elementName, const double *vector, const int numElements, const char *format) |
Creates an element holding an vector. More... | |
DLL_EXPORT ReturnCode | tixiUpdateFloatVector (const TixiDocumentHandle handle, const char *path, const double *vector, const int numElements, const char *format) |
Updates the data of a vector element. More... | |
DLL_EXPORT ReturnCode | tixiCreateElement (const TixiDocumentHandle handle, const char *parentPath, const char *elementName) |
Creates an empty element. More... | |
DLL_EXPORT ReturnCode | tixiCreateElementNS (const TixiDocumentHandle handle, const char *parentPath, const char *qualifiedName, const char *namespaceURI) |
Creates an empty element in the specified namespace. More... | |
DLL_EXPORT ReturnCode | tixiCreateElementAtIndex (const TixiDocumentHandle handle, const char *parentPath, const char *elementName, int index) |
Creates an empty element at a given index. More... | |
DLL_EXPORT ReturnCode | tixiCreateElementNSAtIndex (const TixiDocumentHandle handle, const char *parentPath, const char *qualifiedName, int index, const char *namespaceURI) |
Creates an empty element at a given index in the specified namespace. More... | |
DLL_EXPORT ReturnCode | tixiRenameElement (const TixiDocumentHandle handle, const char *parentPath, const char *oldName, const char *newName) |
Renames an element. More... | |
DLL_EXPORT ReturnCode | tixiRemoveElement (const TixiDocumentHandle handle, const char *elementPath) |
Removes an element. More... | |
DLL_EXPORT ReturnCode | tixiGetNodeType (const TixiDocumentHandle handle, const char *nodePath, char **nodeType) |
Returns the number of child elements beneath a given path. More... | |
DLL_EXPORT ReturnCode | tixiGetNamedChildrenCount (const TixiDocumentHandle handle, const char *elementPath, const char *childName, int *count) |
Returns the number of children elements with the same name. More... | |
DLL_EXPORT ReturnCode | tixiGetChildNodeName (const TixiDocumentHandle handle, const char *parentElementPath, int index, char **name) |
Returns the name of a child node beneath a given path. More... | |
DLL_EXPORT ReturnCode | tixiGetNumberOfChilds (const TixiDocumentHandle handle, const char *elementPath, int *nChilds) |
Returns the number of child elements beneath a given path. More... | |
DLL_EXPORT ReturnCode | tixiSwapElements (const TixiDocumentHandle handle, const char *element1Path, const char *element2Path) |
Swaps to xml elements with each other. More... | |
DLL_EXPORT ReturnCode | tixiExportElementAsString (const TixiDocumentHandle handle, const char *elementPath, char **text) |
Returns the element as one XML text. More... | |
DLL_EXPORT ReturnCode | tixiImportElementFromString (const TixiDocumentHandle handle, const char *parentPath, const char *xmlImportString) |
Imports a char-string as a child element into an existing tixi-document. More... | |
Functions to get the content of an element as a string or a number, functions to create and manipulate its content, and a funtion to remove an element are described in this section.
DLL_EXPORT ReturnCode tixiAddBooleanElement | ( | const TixiDocumentHandle | handle, |
const char * | parentPath, | ||
const char * | elementName, | ||
int | boolean | ||
) |
Creates an element and sets the value to "true" or "false".
Creates an element specified by the elementPath expression and inserts one of the boolean values "true" or "false" into the element. Elements with the same name can be added multiple times.
Fortran syntax:
tixi_add_boolean_element( integer handle, character*n parent_path, character*n element_name, integer boolean, integer error )
[in] | handle | file handle as returned by tixiCreateDocument |
[in] | parentPath | an XPath compliant path to an element in the document specified by handle (see section XPath Examples above) into which the new element is to be inserted. The parent element has to exist already. |
[in] | elementName | name of the element to be inserted into the parent element |
[in] | boolean | boolean value to be placed inside the element pointed to by elementPath. The value of boolean has to be "0" or "1". |
DLL_EXPORT ReturnCode tixiAddBooleanElementNS | ( | const TixiDocumentHandle | handle, |
const char * | parentPath, | ||
const char * | qualifiedName, | ||
const char * | namespaceURI, | ||
int | boolean | ||
) |
Creates an element in the given namesoace and sets the value to "true" or "false".
Creates an element specified by the elementPath expression and inserts one of the boolean values "true" or "false" into the element. Elements with the same name can be added multiple times.
If the namespace does not yet exist in parent nodes, a xmlns attribute is added to the node. If the qualified name contains a prefix, the prefix is used as the namespace prefix also for all future childs nodes.
Fortran syntax:
tixi_add_boolean_element_ns( integer handle, character*n parent_path, character*n qualified_name, character*n namespace_uri, integer boolean, integer error )
[in] | handle | file handle as returned by tixiCreateDocument |
[in] | parentPath | an XPath compliant path to an element in the document specified by handle (see section XPath Examples above) into which the new element is to be inserted. The parent element has to exist already. |
[in] | qualifiedName | qualified name of the element to be inserted into the parent element. This name might include a namespace prefix (e.g. "html:td") |
[in] | namespaceURI | URI of the namespace that should be connected with the element. |
[in] | boolean | boolean value to be placed inside the element pointed to by elementPath. The value of boolean has to be "0" or "1". |
DLL_EXPORT ReturnCode tixiAddDoubleElement | ( | const TixiDocumentHandle | handle, |
const char * | parentPath, | ||
const char * | elementName, | ||
double | number, | ||
const char * | format | ||
) |
Creates an element which holds a floating point number.
Creates an element specified by the elementPath expression. Elements with the same name can be added multiple times.
Fortran syntax:
tixi_add_double_element( integer handle, character*n parent_path, character*n element_name, real number, character*n format, integer error )
[in] | handle | file handle as returned by tixiOpenDocument or tixiCreateDocument |
[in] | parentPath | an XPath compliant path to an element in the document specified by handle (see section XPath Examples above). |
[in] | elementName | name of the element to be inserted into the parent element |
[in] | number | floating point number to be placed inside the element pointed to by elementPath. If number is NULL an empty element will be created. |
[in] | format | format string used to convert number into a string. The format string usage is identical to format strings in printf. If format is NULL "%g" will be used to format the string. |
DLL_EXPORT ReturnCode tixiAddDoubleElementNS | ( | const TixiDocumentHandle | handle, |
const char * | parentPath, | ||
const char * | qualifiedName, | ||
const char * | namespaceURI, | ||
double | number, | ||
const char * | format | ||
) |
Creates an element which holds a floating point number in the given namespace.
Creates an element specified by the elementPath expression. Elements with the same name can be added multiple times.
If the namespace does not yet exist in parent nodes, a xmlns attribute is added to the node. If the qualified name contains a prefix, the prefix is used as the namespace prefix also for all future childs nodes.
Fortran syntax:
tixi_add_double_element_ns( integer handle, character*n parent_path, character*n qualified_name, character*n namespace_uri, real number, character*n format, integer error )
[in] | handle | file handle as returned by tixiOpenDocument or tixiCreateDocument |
[in] | parentPath | an XPath compliant path to an element in the document specified by handle (see section XPath Examples above). |
[in] | qualifiedName | qualified name of the element to be inserted into the parent element. This name might include a namespace prefix (e.g. "html:td") |
[in] | namespaceURI | URI of the namespace that should be connected with the element. |
[in] | number | floating point number to be placed inside the element pointed to by elementPath. If number is NULL an empty element will be created. |
[in] | format | format string used to convert number into a string. The format string usage is identical to format strings in printf. If format is NULL "%g" will be used to format the string. |
DLL_EXPORT ReturnCode tixiAddFloatVector | ( | const TixiDocumentHandle | handle, |
const char * | parentPath, | ||
const char * | elementName, | ||
const double * | vector, | ||
const int | numElements, | ||
const char * | format | ||
) |
Creates an element holding an vector.
Creates an element specified by the elementPath expression and insert the vector elements into the element. Vector with the same name can be added multiple times.
Fortran syntax:
tixi_add_float_vector( integer handle, character*n parent_path, character*n element_name, real array, integer numElements, integer error )
[in] | handle | file handle as returned by tixiCreateDocument |
[in] | parentPath | an XPath compliant path to an element in the document specified by handle (see section XPath Examples above) into which the new element is to be inserted. The parent element has to exist already. |
[in] | elementName | name of the element to be inserted into the parent element |
[in] | vector | The Vector to be placed inside the element pointed to by elementPath. If Vector is NULL an empty element will be created. |
[in] | numElements | the Number of vector-elements to be inserted in the new element. |
[in] | format | format string used to convert number into a string. The format string usage is identical to format strings in printf. If format is NULL "%g" will be used to format the string. |
DLL_EXPORT ReturnCode tixiAddIntegerElement | ( | const TixiDocumentHandle | handle, |
const char * | parentPath, | ||
const char * | elementName, | ||
int | number, | ||
const char * | format | ||
) |
Creates an element which holds an integer.
Creates an element specified by the elementPath expression holding an integer number. Elements with the same name can be added multiple times.
Fortran syntax:
tixi_add_integer_element( integer handle, character*n parent_path, character*n element_name, integer number, character*n format, integer error )
[in] | handle | file handle as returned by tixiOpenDocument or tixiCreateDocument |
[in] | parentPath | an XPath compliant path to an element in the document specified by handle (see section XPath Examples above). |
[in] | elementName | name of the element to be inserted into the parent element |
[in] | number | integer number to be placed inside the element pointed to by elementPath. If number is NULL an empty element will be created. |
[in] | format | format string used to convert number into a string. The format string usage is identical to format strings in printf. If format is NULL "%g" will be used to format the string. |
DLL_EXPORT ReturnCode tixiAddIntegerElementNS | ( | const TixiDocumentHandle | handle, |
const char * | parentPath, | ||
const char * | qualifiedName, | ||
const char * | namespaceURI, | ||
int | number, | ||
const char * | format | ||
) |
Creates an element which holds an integer in the given namespace.
Creates an element specified by the elementPath expression holding an integer number. Elements with the same name can be added multiple times.
If the namespace does not yet exist in parent nodes, a xmlns attribute is added to the node. If the qualified name contains a prefix, the prefix is used as the namespace prefix also for all future childs nodes.
Fortran syntax:
tixi_add_integer_element_ns( integer handle, character*n parent_path, character*n qualified_name, character*n namespace_uri, integer number, character*n format, integer error )
[in] | handle | file handle as returned by tixiOpenDocument or tixiCreateDocument |
[in] | parentPath | an XPath compliant path to an element in the document specified by handle (see section XPath Examples above). |
[in] | qualifiedName | qualified name of the element to be inserted into the parent element. This name might include a namespace prefix (e.g. "html:td") |
[in] | namespaceURI | URI of the namespace that should be connected with the element. |
[in] | number | integer number to be placed inside the element pointed to by elementPath. If number is NULL an empty element will be created. |
[in] | format | format string used to convert number into a string. The format string usage is identical to format strings in printf. If format is NULL "%g" will be used to format the string. |
DLL_EXPORT ReturnCode tixiAddTextElement | ( | const TixiDocumentHandle | handle, |
const char * | parentPath, | ||
const char * | elementName, | ||
const char * | text | ||
) |
Creates an element holding text.
Creates an element specified by the elementPath expression and insert text into the element. Elements with the same name can be added multiple times.
Fortran syntax:
tixi_add_text_element( integer handle, character*n parent_path, character*n element_name, character*n text, integer error )
[in] | handle | file handle as returned by tixiCreateDocument |
[in] | parentPath | an XPath compliant path to an element in the document specified by handle (see section XPath Examples above) into which the new element is to be inserted. The parent element has to exist already. |
[in] | elementName | name of the element to be inserted into the parent element |
[in] | text | text to be placed inside the element pointed to by elementPath. If text is NULL an empty element will be created. |
DLL_EXPORT ReturnCode tixiAddTextElementAtIndex | ( | const TixiDocumentHandle | handle, |
const char * | parentPath, | ||
const char * | elementName, | ||
const char * | text, | ||
int | index | ||
) |
Creates an element holding text at a given index.
Creates an element specified by the elementPath expression and insert text into the element. Elements with the same name can be added multiple times, so in this version of the function an index could be provides to specifiy a exact position.
Fortran syntax:
tixi_add_text_element_at_index( integer handle, character*n parent_path, character*n element_name, character*n text, integer index, integer error )
[in] | handle | file handle as returned by tixiCreateDocument |
[in] | parentPath | an XPath compliant path to an element in the document specified by handle (see section XPath Examples above) into which the new element is to be inserted. The parent element has to exist already. |
[in] | elementName | name of the element to be inserted into the parent element |
[in] | text | text to be placed inside the element pointed to by elementPath. If text is NULL an empty element will be created. |
[in] | index | the position index where the new node should be created. |
DLL_EXPORT ReturnCode tixiAddTextElementNS | ( | const TixiDocumentHandle | handle, |
const char * | parentPath, | ||
const char * | qualifiedName, | ||
const char * | namespaceURI, | ||
const char * | text | ||
) |
Creates an element holding text within the given namespace.
Creates an element specified by the elementPath expression and insert text into the element. Elements with the same name can be added multiple times.
If the namespace does not yet exist in parent nodes, a xmlns attribute is added to the node. If the qualified name contains a prefix, the prefix is used as the namespace prefix also for all future childs nodes.
Fortran syntax:
tixi_add_text_element_ns( integer handle, character*n parent_path, character*n qualified_name, character*n namespace_uri, character*n text, integer error )
[in] | handle | file handle as returned by tixiCreateDocument |
[in] | parentPath | an XPath compliant path to an element in the document specified by handle (see section XPath Examples above) into which the new element is to be inserted. The parent element has to exist already. |
[in] | qualifiedName | qualified name of the element to be inserted into the parent element. This name might include a namespace prefix (e.g. "html:td") |
[in] | namespaceURI | URI of the namespace that should be connected with the element. |
[in] | text | text to be placed inside the element pointed to by elementPath. If text is NULL an empty element will be created. |
DLL_EXPORT ReturnCode tixiAddTextElementNSAtIndex | ( | const TixiDocumentHandle | handle, |
const char * | parentPath, | ||
const char * | qualifiedName, | ||
const char * | namespaceURI, | ||
const char * | text, | ||
int | index | ||
) |
Creates an element holding text at a given index in the specified namespace.
Creates an element specified by the elementPath expression and insert text into the element. Elements with the same name can be added multiple times, so in this version of the function an index could be provides to specifiy a exact position.
If the namespace does not yet exist in parent nodes, a xmlns attribute is added to the node. If the qualified name contains a prefix, the prefix is used as the namespace prefix also for all future childs nodes.
Fortran syntax:
tixi_add_text_element_ns_at_index( integer handle, character*n parent_path, character*n qualified_name, character*n namespace_uri, character*n text, integer index, integer error )
[in] | handle | file handle as returned by tixiCreateDocument |
[in] | parentPath | an XPath compliant path to an element in the document specified by handle (see section XPath Examples above) into which the new element is to be inserted. The parent element has to exist already. |
[in] | qualifiedName | qualified name of the element to be inserted into the parent element. This name might include a namespace prefix (e.g. "html:td") |
[in] | namespaceURI | URI of the namespace that should be connected with the element. |
[in] | text | text to be placed inside the element pointed to by elementPath. If text is NULL an empty element will be created. |
[in] | index | the position index where the new node should be created. |
DLL_EXPORT ReturnCode tixiCreateElement | ( | const TixiDocumentHandle | handle, |
const char * | parentPath, | ||
const char * | elementName | ||
) |
Creates an empty element.
Creates an empty element specified by the elementPath expression Elements with the same name can be added multiple times.
Fortran syntax:
tixi_create_element( integer handle, character*n parent_path, character*n element_name, integer error )
[in] | handle | file handle as returned by tixiCreateDocument |
[in] | parentPath | an XPath compliant path to an element in the document specified by handle (see section XPath Examples above) into which the new element is to be inserted. The parent element has to exist already. |
[in] | elementName | name of the element to be inserted into the parent element |
DLL_EXPORT ReturnCode tixiCreateElementAtIndex | ( | const TixiDocumentHandle | handle, |
const char * | parentPath, | ||
const char * | elementName, | ||
int | index | ||
) |
Creates an empty element at a given index.
Creates an empty element specified by the elementPath expression. In this function you need to provide an index > 0 on which position the new element should be created. Elements with the same name can be added multiple times.
Fortran syntax:
tixi_create_element_at_index( integer handle, character*n parent_path, character*n element_name, integer index, integer error )
[in] | handle | file handle as returned by tixiCreateDocument |
[in] | parentPath | an XPath compliant path to an element in the document specified by handle (see section XPath Examples above) into which the new element is to be inserted. The parent element has to exist already. |
[in] | elementName | name of the element to be inserted into the parent element |
[in] | index | position of the new created element |
DLL_EXPORT ReturnCode tixiCreateElementNS | ( | const TixiDocumentHandle | handle, |
const char * | parentPath, | ||
const char * | qualifiedName, | ||
const char * | namespaceURI | ||
) |
Creates an empty element in the specified namespace.
Creates an empty element specified by the elementPath expression Elements with the same name can be added multiple times.
If the namespace does not yet exist in parent nodes, a xmlns attribute is added to the node. If the qualified name contains a prefix, the prefix is used as the namespace prefix also for all future childs nodes.
Fortran syntax:
tixi_create_element_ns( integer handle, character*n parent_path, character*n qualified_name, character*n namespace_uri, integer error )
[in] | handle | file handle as returned by tixiCreateDocument |
[in] | parentPath | an XPath compliant path to an element in the document specified by handle (see section XPath Examples above) into which the new element is to be inserted. The parent element has to exist already. |
[in] | qualifiedName | qualified name of the element to be inserted into the parent element. This name might include a namespace prefix (e.g. "html:td") |
[in] | namespaceURI | URI of the namespace that should be connected with the element. |
DLL_EXPORT ReturnCode tixiCreateElementNSAtIndex | ( | const TixiDocumentHandle | handle, |
const char * | parentPath, | ||
const char * | qualifiedName, | ||
int | index, | ||
const char * | namespaceURI | ||
) |
Creates an empty element at a given index in the specified namespace.
Creates an empty element specified by the elementPath expression. In this function you need to provide an index > 0 on which position the new element should be created. Elements with the same name can be added multiple times.
If the namespace does not yet exist in parent nodes, a xmlns attribute is added to the node. If the qualified name contains a prefix, the prefix is used as the namespace prefix also for all future childs nodes.
Fortran syntax:
tixi_create_element_at_index_ns( integer handle, character*n parent_path, character*n qualified_name, character*n namespace_uri, integer index, integer error )
[in] | handle | file handle as returned by tixiCreateDocument |
[in] | parentPath | an XPath compliant path to an element in the document specified by handle (see section XPath Examples above) into which the new element is to be inserted. The parent element has to exist already. |
[in] | qualifiedName | qualified name of the element to be inserted into the parent element. This name might include a namespace prefix (e.g. "html:td") |
[in] | namespaceURI | URI of the namespace that should be connected with the element. |
[in] | index | position of the new created element |
DLL_EXPORT ReturnCode tixiExportElementAsString | ( | const TixiDocumentHandle | handle, |
const char * | elementPath, | ||
char ** | text | ||
) |
Returns the element as one XML text.
Returns the XML text of the element specified by elementPath in the document specified by handle. If an error occurs text is set to NULL. On successful return the memory used for text is allocated internally and must not be released by the user. The deallocation is handle when the document referred to by handle is closed. If OpenMode=OPENMODE_RECURSIVE, text will be one big string with all external xml files included.
Fortran syntax:
tixi_export_element_as_string( integer handle, character*n element_path, character*n text, integer error )
[in] | handle | handle as returned by tixiOpenDocument, tixiOpenDocumentRecursive, tixiOpenDocumentFromHTTP, tixiCreateDocument or tixiImportFromString |
[in] | elementPath | an XPath compliant path to an element in the document specified by handle (see section XPath Examples above). |
[out] | text | text content of the document |
DLL_EXPORT ReturnCode tixiGetBooleanElement | ( | const TixiDocumentHandle | handle, |
const char * | elementPath, | ||
int * | boolean | ||
) |
Retrieve boolean content of an element.
Returns the content of the element specified by elementPath in the document specified by handle as an integer number with the values 0=false and 1=true. elementPath must refer to exactly one element which has only a text node and zero or more attributes but no further children with text nodes. If an error occurs boolean is set to NULL. In the XML file, a boolean value could be defined with "1"/"0" or (case sensitive) "true"/"false".
Fortran syntax:
tixi_get_boolean_element( integer handle, character*n element_path, integer boolean, integer error )
[in] | handle | handle as returned by tixiOpenDocument, tixiOpenDocumentRecursive or tixiOpenDocumentFromHTTP |
[in] | elementPath | an XPath compliant path to an element in the document specified by handle (see section XPath Examples above). |
[out] | boolean | content of the element specified by elementPath interpreted as a integer containing boolean values. |
DLL_EXPORT ReturnCode tixiGetChildNodeName | ( | const TixiDocumentHandle | handle, |
const char * | parentElementPath, | ||
int | index, | ||
char ** | name | ||
) |
Returns the name of a child node beneath a given path.
Fortran syntax:
tixi_get_child_node_name( integer handle, character*n element_path, int* index, character*n child_name_array, integer error )
[in] | handle | handle as returned by tixiCreateDocument, tixiOpenDocumentRecursive or tixiOpenDocumentFromHTTP |
[in] | parentElementPath | the path to the parent element in the document specified by handle (see section XPath Examples above). |
[in] | index | number index of the child-element of the given path. |
[out] | name | String containing the name of the child node. If the node is not a normal node, the name variable will contain:
|
DLL_EXPORT ReturnCode tixiGetDoubleElement | ( | const TixiDocumentHandle | handle, |
const char * | elementPath, | ||
double * | number | ||
) |
Retrieve floating point content of an element.
Returns the content of the element specified by elementPath in the document specified by handle as a floating point number. If an error occurs number is set to NULL.
Fortran syntax:
tixi_get_double_element( integer handle, character*n element_path, real number, integer error )
[in] | handle | handle as returned by tixiOpenDocument, tixiOpenDocumentRecursive or tixiOpenDocumentFromHTTP |
[in] | elementPath | an XPath compliant path to an element in the document specified by handle (see section XPath Examples above). |
[out] | number | content of the element specified by elementPath interpreted as a floating point number |
DLL_EXPORT ReturnCode tixiGetIntegerElement | ( | const TixiDocumentHandle | handle, |
const char * | elementPath, | ||
int * | number | ||
) |
Retrieve integer content of an element.
Returns the content of the element specified by elementPath in the document specified by handle as an integer. If an error occurs text is set to NULL. On successful return the memory used for text is allocated internally and must not be released by the user. The deallocation is handle when the document referred to by handle is closed.
Fortran syntax:
tixi_get_integer_element( integer handle, character*n element_path, int* number, integer error )
[in] | handle | handle as returned by tixiOpenDocument, tixiOpenDocumentRecursive or tixiOpenDocumentFromHTTP |
[in] | elementPath | an XPath compliant path to an element in the document specified by handle (see section XPath Examples above). |
[out] | number | content of the element specified by elementPath interpreted as an integer number |
DLL_EXPORT ReturnCode tixiGetNamedChildrenCount | ( | const TixiDocumentHandle | handle, |
const char * | elementPath, | ||
const char * | childName, | ||
int * | count | ||
) |
Returns the number of children elements with the same name.
Fortran syntax:
tixi_get_named_children_count( integer handle, character*n element_path, character*n child_name, int* count, integer error )
[in] | handle | handle as returned by tixiCreateDocument, tixiOpenDocumentRecursive or tixiOpenDocumentFromHTTP |
[in] | elementPath | the path to an element in the document specified by handle (see section XPath Examples above). |
[in] | childName | name of children to be counted |
[out] | count | number of children with name childName. 0 is returned if either the element specified by elementPath has no children at all or has no children with name childName. |
DLL_EXPORT ReturnCode tixiGetNodeType | ( | const TixiDocumentHandle | handle, |
const char * | nodePath, | ||
char ** | nodeType | ||
) |
Returns the number of child elements beneath a given path.
Fortran syntax:
tixi_get_node_type( integer handle, character*n element_path, integer error )
[in] | handle | handle as returned by tixiCreateDocument, tixiOpenDocumentRecursive or tixiOpenDocumentFromHTTP |
[in] | nodePath | an XPath compliant path to an element or node in the document specified by handle (see section XPath Examples above). |
[out] | nodeType | String containing the type of the node. The nodes types are named according to the xml standard, defined on http://www.w3schools.com/dom/dom_nodetype.asp under the section NodeTypes - Named Constants. |
DLL_EXPORT ReturnCode tixiGetNumberOfChilds | ( | const TixiDocumentHandle | handle, |
const char * | elementPath, | ||
int * | nChilds | ||
) |
Returns the number of child elements beneath a given path.
Fortran syntax:
tixi_get_number_of_childs( integer handle, character*n element_path, int* nchilds, integer error )
[in] | handle | handle as returned by tixiCreateDocument, tixiOpenDocumentRecursive or tixiOpenDocumentFromHTTP |
[in] | elementPath | an XPath compliant path to an element in the document specified by handle (see section XPath Examples above). |
[out] | nChilds | Number of child elements beneath the given elementPath. |
DLL_EXPORT ReturnCode tixiGetTextElement | ( | const TixiDocumentHandle | handle, |
const char * | elementPath, | ||
char ** | text | ||
) |
Retrieve text content of an element.
Returns the text content of the element specified by elementPath in the document specified by handle. If elementPath does not refer to an element with textual content, an empty string is returned. If an error occurs text is set to NULL. On successful return the memory used for text is allocated internally and must not be released by the user. The deallocation is handle when the document referred to by handle is closed.
Fortran syntax:
tixi_get_text_element( integer handle, character*n element_path, character*n text, integer error )
[in] | handle | handle as returned by tixiOpenDocument, tixiOpenDocumentRecursive or tixiOpenDocumentFromHTTP |
[in] | elementPath | an XPath compliant path to an element in the document specified by handle (see section XPath Examples above). |
[out] | text | text content of the element specified by elementPath |
DLL_EXPORT ReturnCode tixiImportElementFromString | ( | const TixiDocumentHandle | handle, |
const char * | parentPath, | ||
const char * | xmlImportString | ||
) |
Imports a char-string as a child element into an existing tixi-document.
Creates a new element with the content of the string and checks if it is well formed. The element name is defined through the root element in the imported string. Elements with the same name can be added multiple times.
Fortran syntax:
tixi_import_element_from_string( integer handle, character*n parent_path, character*n xmlImportString, integer error )
[in] | handle | file handle as returned by tixiCreateDocument |
[in] | parentPath | an XPath compliant path to an element in the document specified by handle (see section XPath Examples above) into which the new element is to be inserted. The parent element has to exist already. |
[in] | xmlImportString | the string with the xml-content |
DLL_EXPORT ReturnCode tixiRemoveElement | ( | const TixiDocumentHandle | handle, |
const char * | elementPath | ||
) |
Removes an element.
Removes an element from the document. It is not an error to remove a non existing element.
Fortran syntax:
tixi_remove_element( integer handle, character*n element_path, integer error )
[in] | handle | file handle as returned by tixiCreateDocument |
[in] | elementPath | an XPath compliant path to an element in the document specified by handle (see section XPath Examples above). |
DLL_EXPORT ReturnCode tixiRenameElement | ( | const TixiDocumentHandle | handle, |
const char * | parentPath, | ||
const char * | oldName, | ||
const char * | newName | ||
) |
Renames an element.
This function renames an element from the document.
Fortran syntax:
tixi_rename_element( integer handle, character*n parent_path, character*n old_name, character*n new_name )
[in] | handle | file handle as returned by tixiCreateDocument |
[in] | parentPath | an XPath complian path to the elements parent of the element that shall be renamed |
[in] | oldName | the element that shall be renamed |
[in] | newName | the new name for the element |
DLL_EXPORT ReturnCode tixiSwapElements | ( | const TixiDocumentHandle | handle, |
const char * | element1Path, | ||
const char * | element2Path | ||
) |
Swaps to xml elements with each other.
The function does not allow to swap a parent element with a (sub) child.
[in] | handle | handle as returned by tixiCreateDocument, tixiOpenDocumentRecursive or tixiOpenDocumentFromHTTP. |
[in] | element1Path | an XPath compliant path to the first element. |
[in] | element2Path | an XPath compliant path to the second element. |
DLL_EXPORT ReturnCode tixiUpdateBooleanElement | ( | const TixiDocumentHandle | handle, |
const char * | elementPath, | ||
int | boolean | ||
) |
Updates the boolean content of an element.
Update the boolean content of the element specified by elementPath in the document specified by handle. elementPath must refer to exactly one element which has only a text node and zero or more attributes but no further children with text nodes.
Fortran syntax:
tixi_update_boolean_element( integer handle, character*n element_path, integer boolean, character*n format, integer error )
[in] | handle | handle as returned by tixiOpenDocument, tixiOpenDocumentRecursive or tixiOpenDocumentFromHTTP |
[in] | elementPath | an XPath compliant path to an element in the document specified by handle (see section XPath Examples above). |
[in] | boolean | boolean content of the element to update the element specified by elementPath. The value of boolean has to be "0" or "1". |
DLL_EXPORT ReturnCode tixiUpdateDoubleElement | ( | const TixiDocumentHandle | handle, |
const char * | elementPath, | ||
double | number, | ||
const char * | format | ||
) |
Updates the double content of an element.
Update the double content of the element specified by elementPath in the document specified by handle. elementPath must refer to exactly one element which has only a text node and zero or more attributes but no further children with text nodes.
Fortran syntax:
tixi_update_double_element( integer handle, character*n element_path, real number, character*n format, integer error )
[in] | handle | handle as returned by tixiOpenDocument, tixiOpenDocumentRecursive or tixiOpenDocumentFromHTTP |
[in] | elementPath | an XPath compliant path to an element in the document specified by handle (see section XPath Examples above). |
[in] | number | double content of the element to update the element specified by elementPath |
[in] | format | format string used to convert number into a string. The format string usage is identical to format strings in printf. If format is NULL "%g" will be used to format the string. |
DLL_EXPORT ReturnCode tixiUpdateFloatVector | ( | const TixiDocumentHandle | handle, |
const char * | path, | ||
const double * | vector, | ||
const int | numElements, | ||
const char * | format | ||
) |
Updates the data of a vector element.
Fortran syntax:
tixi_update_float_vector( integer handle, character*n path, real array, integer numElements, integer error )
[in] | handle | file handle as returned by tixiCreateDocument |
[in] | path | an XPath compliant path to an element in the document specified by handle (see section XPath Examples above). |
[in] | vector | The new Vector data replacing the old data at path. If Vector is NULL an empty element will be created. |
[in] | numElements | the Number of vector-elements to be inserted in the new element. |
[in] | format | format string used to convert number into a string. The format string usage is identical to format strings in printf. If format is NULL "%g" will be used to format the string. |
DLL_EXPORT ReturnCode tixiUpdateIntegerElement | ( | const TixiDocumentHandle | handle, |
const char * | elementPath, | ||
int | number, | ||
const char * | format | ||
) |
Updates the double content of an element.
Update the integer content of the element specified by elementPath in the document specified by handle. elementPath must refer to exactly one element which has only a text node and zero or more attributes but no further children with text nodes.
Fortran syntax:
tixi_update_integer_element( integer handle, character*n element_path, integer number, character*n format, integer error )
[in] | handle | handle as returned by tixiOpenDocument, tixiOpenDocumentRecursive or tixiOpenDocumentFromHTTP |
[in] | elementPath | an XPath compliant path to an element in the document specified by handle (see section XPath Examples above). |
[in] | number | integer content of the element to update the element specified by elementPath |
[in] | format | format string used to convert number into a string. The format string usage is identical to format strings in printf. If format is NULL "%g" will be used to format the string. |
DLL_EXPORT ReturnCode tixiUpdateTextElement | ( | const TixiDocumentHandle | handle, |
const char * | elementPath, | ||
const char * | text | ||
) |
Updates the text content of an element.
Update the text content of the element specified by elementPath in the document specified by handle. elementPath must refer to exactly one element which has only a text node and zero or more attributes but no further children with text nodes.
Fortran syntax:
tixi_update_text_element( integer handle, character*n element_path, character*n text, integer error )
[in] | handle | handle as returned by tixiOpenDocument, tixiOpenDocumentRecursive or tixiOpenDocumentFromHTTP |
[in] | elementPath | an XPath compliant path to an element in the document specified by handle (see section XPath Examples above). |
[in] | text | text content of the element to update the element specified by elementPath |