TiXI  3.3.0
Element handling functions

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...
 

Detailed Description

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.

Function Documentation

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 )

Parameters
[in]handlefile handle as returned by tixiCreateDocument
[in]parentPathan 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]elementNamename of the element to be inserted into the parent element
[in]booleanboolean value to be placed inside the element pointed to by elementPath. The value of boolean has to be "0" or "1".
Returns
  • SUCCESS if successfully added the text element
  • INVALID_XML_NAME if elementName is not a valid XML-element name
  • INVALID_HANDLE if the handle is not valid
  • INVALID_XPATH if elementPath is not a well-formed XPath-expression
  • ELEMENT_PATH_NOT_UNIQUE if parentPath resolves not to a single element but to a list of elements
  • ELEMENT_NOT_FOUND if parentPath points to a non-existing element
  • ALREADY_SAVED if element should be added to an already saved document
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 )

Parameters
[in]handlefile handle as returned by tixiCreateDocument
[in]parentPathan 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]qualifiedNamequalified name of the element to be inserted into the parent element. This name might include a namespace prefix (e.g. "html:td")
[in]namespaceURIURI of the namespace that should be connected with the element.
[in]booleanboolean value to be placed inside the element pointed to by elementPath. The value of boolean has to be "0" or "1".
Returns
  • SUCCESS if successfully added the text element
  • INVALID_XML_NAME if elementName is not a valid XML-element name
  • INVALID_HANDLE if the handle is not valid
  • INVALID_XPATH if elementPath is not a well-formed XPath-expression
  • ELEMENT_PATH_NOT_UNIQUE if parentPath resolves not to a single element but to a list of elements
  • ELEMENT_NOT_FOUND if parentPath points to a non-existing element
  • INVALID_NAMESPACE_URI if namespaceURI is invalid (i.e. a null pointer)
  • ALREADY_SAVED if element should be added to an already saved document
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 )

Parameters
[in]handlefile handle as returned by tixiOpenDocument or tixiCreateDocument
[in]parentPathan XPath compliant path to an element in the document specified by handle (see section XPath Examples above).
[in]elementNamename of the element to be inserted into the parent element
[in]numberfloating point number to be placed inside the element pointed to by elementPath. If number is NULL an empty element will be created.
[in]formatformat 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.
Returns
  • SUCCESS if successfully retrieve the text content
  • INVALID_HANDLE if the handle is not valid, i.e. does not or no longer exist
  • INVALID_XPATH if elementPath is not a well-formed XPath-expression
  • ELEMENT_NOT_FOUND if elementPath does not point to a node in the XML-document
  • ELEMENT_PATH_NOT_UNIQUE if elementPath resolves not to a single element but to a list of elements
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 )

Parameters
[in]handlefile handle as returned by tixiOpenDocument or tixiCreateDocument
[in]parentPathan XPath compliant path to an element in the document specified by handle (see section XPath Examples above).
[in]qualifiedNamequalified name of the element to be inserted into the parent element. This name might include a namespace prefix (e.g. "html:td")
[in]namespaceURIURI of the namespace that should be connected with the element.
[in]numberfloating point number to be placed inside the element pointed to by elementPath. If number is NULL an empty element will be created.
[in]formatformat 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.
Returns
  • SUCCESS if successfully retrieve the text content
  • INVALID_HANDLE if the handle is not valid, i.e. does not or no longer exist
  • INVALID_XPATH if elementPath is not a well-formed XPath-expression
  • ELEMENT_NOT_FOUND if elementPath does not point to a node in the XML-document
  • INVALID_NAMESPACE_URI if namespaceURI is invalid (i.e. a null pointer)
  • ELEMENT_PATH_NOT_UNIQUE if elementPath resolves not to a single element but to a list of elements
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 )

Parameters
[in]handlefile handle as returned by tixiCreateDocument
[in]parentPathan 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]elementNamename of the element to be inserted into the parent element
[in]vectorThe Vector to be placed inside the element pointed to by elementPath. If Vector is NULL an empty element will be created.
[in]numElementsthe Number of vector-elements to be inserted in the new element.
[in]formatformat 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.
Returns
  • SUCCESS if successfully added the text element
  • FAILED for internal errors
  • INVALID_XML_NAME if elementName is not a valid XML-element name
  • INVALID_HANDLE if the handle is not valid
  • INVALID_XPATH if elementPath is not a well-formed XPath-expression
  • ELEMENT_PATH_NOT_UNIQUE if parentPath resolves not to a single element but to a list of elements
  • ELEMENT_NOT_FOUND if parentPath points to a non-existing element
  • ALREADY_SAVED if element should be added to an already saved document
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 )

Parameters
[in]handlefile handle as returned by tixiOpenDocument or tixiCreateDocument
[in]parentPathan XPath compliant path to an element in the document specified by handle (see section XPath Examples above).
[in]elementNamename of the element to be inserted into the parent element
[in]numberinteger number to be placed inside the element pointed to by elementPath. If number is NULL an empty element will be created.
[in]formatformat 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.
Returns
  • SUCCESS if successfully retrieve the text content
  • INVALID_HANDLE if the handle is not valid, i.e. does not or no longer exist
  • INVALID_XPATH if elementPath is not a well-formed XPath-expression
  • ELEMENT_NOT_FOUND if elementPath does not point to a node in the XML-document
  • ELEMENT_PATH_NOT_UNIQUE if elementPath resolves not to a single element but to a list of elements
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 )

Parameters
[in]handlefile handle as returned by tixiOpenDocument or tixiCreateDocument
[in]parentPathan XPath compliant path to an element in the document specified by handle (see section XPath Examples above).
[in]qualifiedNamequalified name of the element to be inserted into the parent element. This name might include a namespace prefix (e.g. "html:td")
[in]namespaceURIURI of the namespace that should be connected with the element.
[in]numberinteger number to be placed inside the element pointed to by elementPath. If number is NULL an empty element will be created.
[in]formatformat 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.
Returns
  • SUCCESS if successfully retrieve the text content
  • INVALID_HANDLE if the handle is not valid, i.e. does not or no longer exist
  • INVALID_XPATH if elementPath is not a well-formed XPath-expression
  • ELEMENT_NOT_FOUND if elementPath does not point to a node in the XML-document
  • INVALID_NAMESPACE_URI if namespaceURI is invalid (i.e. a null pointer)
  • ELEMENT_PATH_NOT_UNIQUE if elementPath resolves not to a single element but to a list of elements
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 )

Parameters
[in]handlefile handle as returned by tixiCreateDocument
[in]parentPathan 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]elementNamename of the element to be inserted into the parent element
[in]texttext to be placed inside the element pointed to by elementPath. If text is NULL an empty element will be created.
Returns
  • SUCCESS if successfully added the text element
  • INVALID_XML_NAME if elementName is not a valid XML-element name
  • INVALID_HANDLE if the handle is not valid
  • INVALID_XPATH if elementPath is not a well-formed XPath-expression
  • ELEMENT_PATH_NOT_UNIQUE if parentPath resolves not to a single element but to a list of elements
  • ELEMENT_NOT_FOUND if parentPath points to a non-existing element
  • ALREADY_SAVED if element should be added to an already saved document
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 )

Parameters
[in]handlefile handle as returned by tixiCreateDocument
[in]parentPathan 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]elementNamename of the element to be inserted into the parent element
[in]texttext to be placed inside the element pointed to by elementPath. If text is NULL an empty element will be created.
[in]indexthe position index where the new node should be created.
Returns
  • SUCCESS if successfully added the text element
  • INVALID_XML_NAME if elementName is not a valid XML-element name
  • INVALID_HANDLE if the handle is not valid
  • INVALID_XPATH if elementPath is not a well-formed XPath-expression
  • ELEMENT_PATH_NOT_UNIQUE if parentPath resolves not to a single element but to a list of elements
  • ELEMENT_NOT_FOUND if parentPath points to a non-existing element
  • ALREADY_SAVED if element should be added to an already saved document
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 )

Parameters
[in]handlefile handle as returned by tixiCreateDocument
[in]parentPathan 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]qualifiedNamequalified name of the element to be inserted into the parent element. This name might include a namespace prefix (e.g. "html:td")
[in]namespaceURIURI of the namespace that should be connected with the element.
[in]texttext to be placed inside the element pointed to by elementPath. If text is NULL an empty element will be created.
Returns
  • SUCCESS if successfully added the text element
  • INVALID_XML_NAME if elementName is not a valid XML-element name
  • INVALID_HANDLE if the handle is not valid
  • INVALID_XPATH if elementPath is not a well-formed XPath-expression
  • ELEMENT_PATH_NOT_UNIQUE if parentPath resolves not to a single element but to a list of elements
  • ELEMENT_NOT_FOUND if parentPath points to a non-existing element
  • INVALID_NAMESPACE_URI if namespaceURI is invalid (i.e. a null pointer)
  • ALREADY_SAVED if element should be added to an already saved document
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 )

Parameters
[in]handlefile handle as returned by tixiCreateDocument
[in]parentPathan 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]qualifiedNamequalified name of the element to be inserted into the parent element. This name might include a namespace prefix (e.g. "html:td")
[in]namespaceURIURI of the namespace that should be connected with the element.
[in]texttext to be placed inside the element pointed to by elementPath. If text is NULL an empty element will be created.
[in]indexthe position index where the new node should be created.
Returns
  • SUCCESS if successfully added the text element
  • INVALID_XML_NAME if elementName is not a valid XML-element name
  • INVALID_HANDLE if the handle is not valid
  • INVALID_XPATH if elementPath is not a well-formed XPath-expression
  • ELEMENT_PATH_NOT_UNIQUE if parentPath resolves not to a single element but to a list of elements
  • ELEMENT_NOT_FOUND if parentPath points to a non-existing element
  • INVALID_NAMESPACE_URI if namespaceURI is invalid (i.e. a null pointer)
  • ALREADY_SAVED if element should be added to an already saved document
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 )

Parameters
[in]handlefile handle as returned by tixiCreateDocument
[in]parentPathan 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]elementNamename of the element to be inserted into the parent element
Returns
  • SUCCESS if successfully added the text element
  • INVALID_XML_NAME if elementName is not a valid XML-element name
  • INVALID_HANDLE if the handle is not valid
  • INVALID_XPATH if elementPath is not a well-formed XPath-expression
  • ELEMENT_PATH_NOT_UNIQUE if parentPath resolves not to a single element but to a list of elements
  • ELEMENT_NOT_FOUND if parentPath points to a non-existing element
  • ALREADY_SAVED if element should be added to an already saved document
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 )

Parameters
[in]handlefile handle as returned by tixiCreateDocument
[in]parentPathan 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]elementNamename of the element to be inserted into the parent element
[in]indexposition of the new created element
Returns
  • SUCCESS if successfully added the text element
  • INVALID_XML_NAME if elementName is not a valid XML-element name
  • INVALID_HANDLE if the handle is not valid
  • INVALID_XPATH if elementPath is not a well-formed XPath-expression
  • ELEMENT_PATH_NOT_UNIQUE if parentPath resolves not to a single element but to a list of elements
  • ELEMENT_NOT_FOUND if parentPath points to a non-existing element
  • ALREADY_SAVED if element should be added to an already saved document
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 )

Parameters
[in]handlefile handle as returned by tixiCreateDocument
[in]parentPathan 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]qualifiedNamequalified name of the element to be inserted into the parent element. This name might include a namespace prefix (e.g. "html:td")
[in]namespaceURIURI of the namespace that should be connected with the element.
Returns
  • SUCCESS if successfully added the text element
  • INVALID_XML_NAME if elementName is not a valid XML-element name
  • INVALID_HANDLE if the handle is not valid
  • INVALID_XPATH if elementPath is not a well-formed XPath-expression
  • ELEMENT_PATH_NOT_UNIQUE if parentPath resolves not to a single element but to a list of elements
  • ELEMENT_NOT_FOUND if parentPath points to a non-existing element
  • INVALID_NAMESPACE_URI if namespaceURI is invalid (i.e. a null pointer)
  • ALREADY_SAVED if element should be added to an already saved document
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 )

Parameters
[in]handlefile handle as returned by tixiCreateDocument
[in]parentPathan 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]qualifiedNamequalified name of the element to be inserted into the parent element. This name might include a namespace prefix (e.g. "html:td")
[in]namespaceURIURI of the namespace that should be connected with the element.
[in]indexposition of the new created element
Returns
  • SUCCESS if successfully added the text element
  • INVALID_XML_NAME if elementName is not a valid XML-element name
  • INVALID_HANDLE if the handle is not valid
  • INVALID_XPATH if elementPath is not a well-formed XPath-expression
  • ELEMENT_PATH_NOT_UNIQUE if parentPath resolves not to a single element but to a list of elements
  • ELEMENT_NOT_FOUND if parentPath points to a non-existing element
  • INVALID_NAMESPACE_URI if namespaceURI is invalid (i.e. a null pointer)
  • ALREADY_SAVED if element should be added to an already saved document
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 )

Parameters
[in]handlehandle as returned by tixiOpenDocument, tixiOpenDocumentRecursive, tixiOpenDocumentFromHTTP, tixiCreateDocument or tixiImportFromString
[in]elementPathan XPath compliant path to an element in the document specified by handle (see section XPath Examples above).
[out]texttext content of the document
Returns
  • SUCCESS if successfully retrieve the text content of a single element
  • INVALID_HANDLE if the handle is not valid, i.e. does not or no longer exist
  • INVALID_XPATH if elementPath is not a well-formed XPath-expression
  • ELEMENT_NOT_FOUND if elementPath does not point to a node in the XML-document
  • ELEMENT_PATH_NOT_UNIQUE if elementPath resolves not to a single element but to a list of elements
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 )

Parameters
[in]handlehandle as returned by tixiOpenDocument, tixiOpenDocumentRecursive or tixiOpenDocumentFromHTTP
[in]elementPathan XPath compliant path to an element in the document specified by handle (see section XPath Examples above).
[out]booleancontent of the element specified by elementPath interpreted as a integer containing boolean values.
Returns
  • SUCCESS if successfully retrieve the text content of a single element
  • INVALID_HANDLE if the handle is not valid, i.e. does not or no longer exist
  • INVALID_XPATH if elementPath is not a well-formed XPath-expression
  • ELEMENT_NOT_FOUND if elementPath does not point to a node in the XML-document
  • ELEMENT_PATH_NOT_UNIQUE if elementPath resolves not to a single element but to a list of elements
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 )

Parameters
[in]handlehandle as returned by tixiCreateDocument, tixiOpenDocumentRecursive or tixiOpenDocumentFromHTTP
[in]parentElementPaththe path to the parent element in the document specified by handle (see section XPath Examples above).
[in]indexnumber index of the child-element of the given path.
[out]nameString containing the name of the child node. If the node is not a normal node, the name variable will contain:
  • #text - in case of a text node
  • #comment - in case of a comment node
  • #cdata-section - in case of a CDATA section node
Returns
  • SUCCESS if a count is computed
  • INVALID_HANDLE if the handle is not valid, i.e. does not or no longer exist
  • INVALID_XPATH if elementPath is not a well-formed XPath-expression
  • ELEMENT_NOT_FOUND if elementPath does not point to a node in the XML-document
  • ELEMENT_PATH_NOT_UNIQUE if elementPath resolves not to a single element but to a list of elements
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 )

Parameters
[in]handlehandle as returned by tixiOpenDocument, tixiOpenDocumentRecursive or tixiOpenDocumentFromHTTP
[in]elementPathan XPath compliant path to an element in the document specified by handle (see section XPath Examples above).
[out]numbercontent of the element specified by elementPath interpreted as a floating point number
Returns
  • SUCCESS if successfully retrieve the text content of a single element
  • INVALID_HANDLE if the handle is not valid, i.e. does not or no longer exist
  • INVALID_XPATH if elementPath is not a well-formed XPath-expression
  • ELEMENT_NOT_FOUND if elementPath does not point to a node in the XML-document
  • ELEMENT_PATH_NOT_UNIQUE if elementPath resolves not to a single element but to a list of elements
  • NO_NUMBER if the content of elementPath cannot be interpreted as a numeric value
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 )

Parameters
[in]handlehandle as returned by tixiOpenDocument, tixiOpenDocumentRecursive or tixiOpenDocumentFromHTTP
[in]elementPathan XPath compliant path to an element in the document specified by handle (see section XPath Examples above).
[out]numbercontent of the element specified by elementPath interpreted as an integer number
Returns
  • SUCCESS if successfully retrieve the text content of a single element
  • INVALID_HANDLE if the handle is not valid, i.e. does not or no longer exist
  • INVALID_XPATH if elementPath is not a well-formed XPath-expression
  • ELEMENT_NOT_FOUND if elementPath does not point to a node in the XML-document
  • ELEMENT_PATH_NOT_UNIQUE if elementPath resolves not to a single element but to a list of elements
  • NO_NUMBER if the content of elementPath cannot be interpreted as a numeric value
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 )

Parameters
[in]handlehandle as returned by tixiCreateDocument, tixiOpenDocumentRecursive or tixiOpenDocumentFromHTTP
[in]elementPaththe path to an element in the document specified by handle (see section XPath Examples above).
[in]childNamename of children to be counted
[out]countnumber 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.
Returns
  • SUCCESS if a count is computed
  • INVALID_HANDLE if the handle is not valid, i.e. does not or no longer exist
  • INVALID_XPATH if elementPath is not a well-formed XPath-expression
  • ELEMENT_NOT_FOUND if elementPath does not point to a node in the XML-document
  • ELEMENT_PATH_NOT_UNIQUE if elementPath resolves not to a single element but to a list of elements
  • NO_CHILD_NAME if childName is NULL
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 )

Parameters
[in]handlehandle as returned by tixiCreateDocument, tixiOpenDocumentRecursive or tixiOpenDocumentFromHTTP
[in]nodePathan XPath compliant path to an element or node in the document specified by handle (see section XPath Examples above).
[out]nodeTypeString 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.
Returns
  • SUCCESS if the type is obtained
  • INVALID_HANDLE if the handle is not valid, i.e. does not or no longer exist
  • INVALID_XPATH if elementPath is not a well-formed XPath-expression
  • ELEMENT_NOT_FOUND if elementPath does not point to a node in the XML-document
  • ELEMENT_PATH_NOT_UNIQUE if elementPath resolves not to a single element but to a list of elements
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 )

Parameters
[in]handlehandle as returned by tixiCreateDocument, tixiOpenDocumentRecursive or tixiOpenDocumentFromHTTP
[in]elementPathan XPath compliant path to an element in the document specified by handle (see section XPath Examples above).
[out]nChildsNumber of child elements beneath the given elementPath.
Returns
  • SUCCESS if a count is computed
  • INVALID_HANDLE if the handle is not valid, i.e. does not or no longer exist
  • INVALID_XPATH if elementPath is not a well-formed XPath-expression
  • ELEMENT_NOT_FOUND if elementPath does not point to a node in the XML-document
  • ELEMENT_PATH_NOT_UNIQUE if elementPath resolves not to a single element but to a list of elements
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 )

Parameters
[in]handlehandle as returned by tixiOpenDocument, tixiOpenDocumentRecursive or tixiOpenDocumentFromHTTP
[in]elementPathan XPath compliant path to an element in the document specified by handle (see section XPath Examples above).
[out]texttext content of the element specified by elementPath
Returns
  • SUCCESS if successfully retrieve the text content of a single element
  • INVALID_HANDLE if the handle is not valid, i.e. does not or no longer exist
  • INVALID_XPATH if elementPath is not a well-formed XPath-expression
  • ELEMENT_NOT_FOUND if elementPath does not point to a node in the XML-document
  • ELEMENT_PATH_NOT_UNIQUE if elementPath resolves not to a single element but to a list of elements
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 )

Parameters
[in]handlefile handle as returned by tixiCreateDocument
[in]parentPathan 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]xmlImportStringthe string with the xml-content
Returns
  • SUCCESS if successfully added the text element
  • NOT_WELL_FORMED if importing of the string succeeds but test for well-formedness fails
  • INVALID_HANDLE if the handle is not valid
  • INVALID_XPATH if elementPath is not a well-formed XPath-expression
  • ELEMENT_PATH_NOT_UNIQUE if parentPath resolves not to a single element but to a list of elements
  • ELEMENT_NOT_FOUND if parentPath points to a non-existing element
  • ALREADY_SAVED if element should be added to an already saved document
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 )

Parameters
[in]handlefile handle as returned by tixiCreateDocument
[in]elementPathan XPath compliant path to an element in the document specified by handle (see section XPath Examples above).
Returns
  • SUCCESS if successfully removed the element
  • INVALID_HANDLE if the handle is not valid, i.e. does not or no longer exist
  • INVALID_XPATH if elementPath is not a well-formed XPath-expression
  • ELEMENT_NOT_FOUND if elementPath does not point to a node in the XML-document
  • ELEMENT_PATH_NOT_UNIQUE if elementPath resolves not to a single element but to a list of elements
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 )

Parameters
[in]handlefile handle as returned by tixiCreateDocument
[in]parentPathan XPath complian path to the elements parent of the element that shall be renamed
[in]oldNamethe element that shall be renamed
[in]newNamethe new name for the element
Returns
  • SUCCESS if the element was renamed successfully
  • INVALID_HANDLE if the handle is not valid, i.e. does not or no longer exist
  • INVALD_XPATH if the parentPath is not a well-formed XPath-expression
  • ELEMENT_NOT_FOUND if there does not exist an element with name "oldName" unter the parentPath
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.

Parameters
[in]handlehandle as returned by tixiCreateDocument, tixiOpenDocumentRecursive or tixiOpenDocumentFromHTTP.
[in]element1Pathan XPath compliant path to the first element.
[in]element2Pathan XPath compliant path to the second element.
Returns
  • SUCCESS if swap was successful
  • FAILED if one element is parent of the other element.
  • INVALID_HANDLE if the handle is not valid, i.e. does not or no longer exist
  • INVALID_XPATH if element1Path or element2Path is not a well-formed XPath-expression
  • ELEMENT_NOT_FOUND if element1Path or element2Path does not point to a node in the XML-document
  • ELEMENT_PATH_NOT_UNIQUE if element1Path or element2Path resolves not to a single element but to a list of elements
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 )

Parameters
[in]handlehandle as returned by tixiOpenDocument, tixiOpenDocumentRecursive or tixiOpenDocumentFromHTTP
[in]elementPathan XPath compliant path to an element in the document specified by handle (see section XPath Examples above).
[in]booleanboolean content of the element to update the element specified by elementPath. The value of boolean has to be "0" or "1".
Returns
  • SUCCESS if successfully retrieve the text content of a single element
  • INVALID_HANDLE if the handle is not valid, i.e. does not or no longer exist
  • INVALID_XPATH if elementPath is not a well-formed XPath-expression
  • ELEMENT_NOT_FOUND if elementPath does not point to a node in the XML-document
  • ELEMENT_PATH_NOT_UNIQUE if elementPath resolves not to a single element but to a list of elements
  • FAILED if node is no textNode
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 )

Parameters
[in]handlehandle as returned by tixiOpenDocument, tixiOpenDocumentRecursive or tixiOpenDocumentFromHTTP
[in]elementPathan XPath compliant path to an element in the document specified by handle (see section XPath Examples above).
[in]numberdouble content of the element to update the element specified by elementPath
[in]formatformat 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.
Returns
  • SUCCESS if successfully retrieve the text content of a single element
  • INVALID_HANDLE if the handle is not valid, i.e. does not or no longer exist
  • INVALID_XPATH if elementPath is not a well-formed XPath-expression
  • ELEMENT_NOT_FOUND if elementPath does not point to a node in the XML-document
  • ELEMENT_PATH_NOT_UNIQUE if elementPath resolves not to a single element but to a list of elements
  • FAILED if node is no textNode
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 )

Parameters
[in]handlefile handle as returned by tixiCreateDocument
[in]pathan XPath compliant path to an element in the document specified by handle (see section XPath Examples above).
[in]vectorThe new Vector data replacing the old data at path. If Vector is NULL an empty element will be created.
[in]numElementsthe Number of vector-elements to be inserted in the new element.
[in]formatformat 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.
Returns
  • SUCCESS if successfully added the text element
  • FAILED for internal errors
  • INVALID_XML_NAME if elementName is not a valid XML-element name
  • INVALID_HANDLE if the handle is not valid
  • INVALID_XPATH if path is not a well-formed XPath-expression
  • ELEMENT_PATH_NOT_UNIQUE if path resolves not to a single element but to a list of elements
  • ELEMENT_NOT_FOUND if path points to a non-existing element
  • ALREADY_SAVED if element should be added to an already saved document
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 )

Parameters
[in]handlehandle as returned by tixiOpenDocument, tixiOpenDocumentRecursive or tixiOpenDocumentFromHTTP
[in]elementPathan XPath compliant path to an element in the document specified by handle (see section XPath Examples above).
[in]numberinteger content of the element to update the element specified by elementPath
[in]formatformat 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.
Returns
  • SUCCESS if successfully retrieve the text content of a single element
  • INVALID_HANDLE if the handle is not valid, i.e. does not or no longer exist
  • INVALID_XPATH if elementPath is not a well-formed XPath-expression
  • ELEMENT_NOT_FOUND if elementPath does not point to a node in the XML-document
  • ELEMENT_PATH_NOT_UNIQUE if elementPath resolves not to a single element but to a list of elements
  • FAILED if node is no textNode
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 )

Parameters
[in]handlehandle as returned by tixiOpenDocument, tixiOpenDocumentRecursive or tixiOpenDocumentFromHTTP
[in]elementPathan XPath compliant path to an element in the document specified by handle (see section XPath Examples above).
[in]texttext content of the element to update the element specified by elementPath
Returns
  • SUCCESS if successfully retrieve the text content of a single element
  • INVALID_HANDLE if the handle is not valid, i.e. does not or no longer exist
  • INVALID_XPATH if elementPath is not a well-formed XPath-expression
  • ELEMENT_NOT_FOUND if elementPath does not point to a node in the XML-document
  • ELEMENT_PATH_NOT_UNIQUE if elementPath resolves not to a single element but to a list of elements
  • FAILED if node is no textNode

Generated Tue Mar 8 2022 14:11:54, by Martin Siggel DLR