TiXI
3.3.0
|
Functions | |
DLL_EXPORT ReturnCode | tixiGetTextAttribute (const TixiDocumentHandle handle, const char *elementPath, const char *attributeName, char **text) |
Retrieves value of an element's attribute as a string. More... | |
DLL_EXPORT ReturnCode | tixiGetIntegerAttribute (const TixiDocumentHandle handle, const char *elementPath, const char *attributeName, int *number) |
Retrieves value of an element's attribute as an integer. More... | |
DLL_EXPORT ReturnCode | tixiGetBooleanAttribute (const TixiDocumentHandle handle, const char *elementPath, const char *attributeName, int *boolean) |
Retrieves value of an element's attribute as an boolean. More... | |
DLL_EXPORT ReturnCode | tixiGetDoubleAttribute (const TixiDocumentHandle handle, const char *elementPath, const char *attributeName, double *number) |
Retrieves value of an element's attribute as a floating point number. More... | |
DLL_EXPORT ReturnCode | tixiAddTextAttribute (const TixiDocumentHandle handle, const char *elementPath, const char *attributeName, const char *attributeValue) |
Adds an attribute with a string value to an element. More... | |
DLL_EXPORT ReturnCode | tixiAddDoubleAttribute (const TixiDocumentHandle handle, const char *elementPath, const char *attributeName, double number, const char *format) |
Adds an attribute with a floating point number value to an element. More... | |
DLL_EXPORT ReturnCode | tixiAddIntegerAttribute (const TixiDocumentHandle handle, const char *elementPath, const char *attributeName, int number, const char *format) |
Adds an attribute with an integer number value to an element. More... | |
DLL_EXPORT ReturnCode | tixiRemoveAttribute (const TixiDocumentHandle handle, const char *elementPath, const char *attributeName) |
Removes an attribute. More... | |
DLL_EXPORT ReturnCode | tixiGetNumberOfAttributes (const TixiDocumentHandle handle, const char *elementPath, int *nAttributes) |
Returns the number of attributes of a given node. More... | |
DLL_EXPORT ReturnCode | tixiGetAttributeName (const TixiDocumentHandle handle, const char *elementPath, int attrIndex, char **attrName) |
Returns the name of an attribute beneath a given path. More... | |
Functions to get the content of an element attribute as a string or a number, functions to create and manipulate attributes, and a function to remove attributes are described in this section.
DLL_EXPORT ReturnCode tixiAddDoubleAttribute | ( | const TixiDocumentHandle | handle, |
const char * | elementPath, | ||
const char * | attributeName, | ||
double | number, | ||
const char * | format | ||
) |
Adds an attribute with a floating point number value to an element.
Adds an attribute with name attributeName and a floating point number value to an element specified by the elementPath expression. If the attribute already exists its previous value is replaced.
Fortran syntax:
tixi_add_double_attribute( integer handle, character*n element_path, character*n attribute_name, real number, character*n format, integer error )
[in] | handle | file handle as returned by tixiOpenDocument or tixiCreateDocument |
[in] | elementPath | an XPath compliant path to an element in the document specified by handle (see section XPath Examples above). |
[in] | attributeName | name of the attribute to be added to the element. The name can also consist of a namespace prefix + ":" + the attribute name. |
[in] | number | floating point value to be assigned to the attribute. If number is NULL an error is return and the attribute is not 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 tixiAddIntegerAttribute | ( | const TixiDocumentHandle | handle, |
const char * | elementPath, | ||
const char * | attributeName, | ||
int | number, | ||
const char * | format | ||
) |
Adds an attribute with an integer number value to an element.
Adds an attribute with name attributeName and a integer number value to an element specified by the elementPath expression. If the attribute already exists its previous value is replaced.
Fortran syntax:
tixi_add_integer_attribute( integer handle, character*n element_path, character*n attribute_name, integer number, character*n format, integer error )
[in] | handle | file handle as returned by tixiOpenDocument or tixiCreateDocument |
[in] | elementPath | an XPath compliant path to an element in the document specified by handle (see section XPath Examples above). |
[in] | attributeName | name of the attribute to be added to the element. The name can also consist of a namespace prefix + ":" + the attribute name. |
[in] | number | integer value to be assigned to the attribute. If number is NULL an error is return and the attribute is not 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 tixiAddTextAttribute | ( | const TixiDocumentHandle | handle, |
const char * | elementPath, | ||
const char * | attributeName, | ||
const char * | attributeValue | ||
) |
Adds an attribute with a string value to an element.
Adds an attribute with name attributeName and value attributeValue to an element specified by the elementPath expression. If the attribute already exists its previous value is replaced by text.
Fortran syntax:
tixi_add_text_attribute( integer handle, character*n element_path, character*n attribute_name, character*n attribute_value, integer error )
[in] | handle | file handle as returned by tixiOpenDocument or tixiCreateDocument |
[in] | elementPath | an XPath compliant path to an element in the document specified by handle (see section XPath Examples above). |
[in] | attributeName | name of the attribute to be added to the element. The name can also consist of a namespace prefix + ":" + the attribute name. |
[in] | attributeValue | text to assigned to the attribute. If attributeValue is NULL the empty string will be assigned to the attribute. |
DLL_EXPORT ReturnCode tixiGetAttributeName | ( | const TixiDocumentHandle | handle, |
const char * | elementPath, | ||
int | attrIndex, | ||
char ** | attrName | ||
) |
Returns the name of an attribute beneath a given path.
Fortran syntax:
tixi_get_attribute_name( integer handle, character*n element_path, int* index, character*n attr_name_array, 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). |
[in] | attrIndex | number index of the attribute of the given path (counting from 1...tixiGetNumberOfAttributes) |
[out] | attrName | String containing the attribute name. |
DLL_EXPORT ReturnCode tixiGetBooleanAttribute | ( | const TixiDocumentHandle | handle, |
const char * | elementPath, | ||
const char * | attributeName, | ||
int * | boolean | ||
) |
Retrieves value of an element's attribute as an boolean.
Returns the value of an attribute specified by attributeName of the element, specified by elementPath, in the document specified by handle. On successful return the memory used for value is allocated internally and must not be released by the user. The memory is deallocated when the document referred to by handle is closed.
Fortran syntax:
tixi_get_boolean_attribute( integer handle, character*n element_path, character*n attribute_name, integer boolean, integer error )
[in] | handle | handle as returned by tixiOpenDocument or tixiCreateDocument |
[in] | elementPath | an XPath compliant path to an element in the document specified by handle (see section XPath Examples above). |
[in] | attributeName | name of the attribute to be added to the element. The name can also consist of a namespace prefix + ":" + the attribute name. |
[out] | boolean | value of the specified attribute as an boolean value |
DLL_EXPORT ReturnCode tixiGetDoubleAttribute | ( | const TixiDocumentHandle | handle, |
const char * | elementPath, | ||
const char * | attributeName, | ||
double * | number | ||
) |
Retrieves value of an element's attribute as a floating point number.
Returns the value of an attribute specified by attributeName of the element, specified by elementPath, in the document specified by handle. On successful return the memory used for value is allocated internally and must not be released by the user. The memory is deallocated when the document referred to by handle is closed.
Fortran syntax:
tixi_get_double_attribute( integer handle, character*n element_path, character*n attribute_name, real *number, integer error )
[in] | handle | handle as returned by tixiOpenDocument or tixiCreateDocument |
[in] | elementPath | an XPath compliant path to an element in the document specified by handle (see section XPath Examples above). |
[in] | attributeName | name of the attribute to be added to the element. The name can also consist of a namespace prefix + ":" + the attribute name. |
[out] | number | value of the specified attribute as a floating point value |
DLL_EXPORT ReturnCode tixiGetIntegerAttribute | ( | const TixiDocumentHandle | handle, |
const char * | elementPath, | ||
const char * | attributeName, | ||
int * | number | ||
) |
Retrieves value of an element's attribute as an integer.
Returns the value of an attribute specified by attributeName of the element, specified by elementPath, in the document specified by handle. On successful return the memory used for value is allocated internally and must not be released by the user. The memory is deallocated when the document referred to by handle is closed.
Fortran syntax:
tixi_get_integer_attribute( integer handle, character*n element_path, character*n attribute_name, integer *number, integer error )
[in] | handle | handle as returned by tixiOpenDocument or tixiCreateDocument |
[in] | elementPath | an XPath compliant path to an element in the document specified by handle (see section XPath Examples above). |
[in] | attributeName | name of the attribute to be added to the element. The name can also consist of a namespace prefix + ":" + the attribute name. |
[out] | number | value of the specified attribute as an integer value |
DLL_EXPORT ReturnCode tixiGetNumberOfAttributes | ( | const TixiDocumentHandle | handle, |
const char * | elementPath, | ||
int * | nAttributes | ||
) |
Returns the number of attributes of a given node.
Fortran syntax:
tixi_get_number_of_attributes( integer handle, character*n element_path, int* nattr, 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] | nAttributes | Number of attributes of a given node. |
DLL_EXPORT ReturnCode tixiGetTextAttribute | ( | const TixiDocumentHandle | handle, |
const char * | elementPath, | ||
const char * | attributeName, | ||
char ** | text | ||
) |
Retrieves value of an element's attribute as a string.
Returns the value of an attribute specified by attributeName of the element, specified by elementPath, in the document specified by handle. On successful return the memory used for value is allocated internally and must not be released by the user. The memory is deallocated when the document referred to by handle is closed.
Fortran syntax:
tixi_get_text_attribute( integer handle, character*n element_path, character*n attribute_name, character*n text, integer error )
[in] | handle | handle as returned by tixiOpenDocument or tixiCreateDocument |
[in] | elementPath | an XPath compliant path to an element in the document specified by handle (see section XPath Examples above). |
[in] | attributeName | name of the attribute to be added to the element. The name can also consist of a namespace prefix + ":" + the attribute name. |
[out] | text | value of the specified attribute as a string |
DLL_EXPORT ReturnCode tixiRemoveAttribute | ( | const TixiDocumentHandle | handle, |
const char * | elementPath, | ||
const char * | attributeName | ||
) |
Removes an attribute.
Removes an attribute from an element. It is not an error to remove an non existing attribute.
Fortran syntax:
tixi_remove_attribute( integer handle, character*n element_path, character*n attribute_name, integer error )
[in] | handle | file handle as returned by tixiOpenDocument or tixiCreateDocument |
[in] | elementPath | an XPath compliant path to an element in the document specified by handle (see section XPath Examples above). |
[in] | attributeName | name of the attribute to be added to the element |