TiXI
3.3.0
|
Functions | |
DLL_EXPORT ReturnCode | tixiXPathEvaluateNodeNumber (TixiDocumentHandle handle, const char *xPathExpression, int *number) |
Evaluates a XPath expression and returns the number of result nodes matching this xpath expression. More... | |
DLL_EXPORT ReturnCode | tixiXPathExpressionGetXPath (TixiDocumentHandle handle, const char *xPathExpression, int index, char **xPath) |
Evaluates a XPath expression and the xPath for the i-th result. More... | |
DLL_EXPORT ReturnCode | tixiXPathExpressionGetTextByIndex (TixiDocumentHandle handle, const char *xPathExpression, int elementNumber, char **text) |
Evaluates a XPath expression and returns the text content of the resultnode matching this xpath expression. More... | |
Function for evaluating XPath expressions.
DLL_EXPORT ReturnCode tixiXPathEvaluateNodeNumber | ( | TixiDocumentHandle | handle, |
const char * | xPathExpression, | ||
int * | number | ||
) |
Evaluates a XPath expression and returns the number of result nodes matching this xpath expression.
Fortran syntax:
tixi_xpath_evaluate_node_number( integer handle, character*n xpathExpression, integer number, integer error )
[in] | handle | handle as returned by tixiOpenDocument, tixiOpenDocumentRecursive, tixiOpenDocumentFromHTTP, tixiCreateDocument or tixiImportFromString |
[in] | xPathExpression | The XPath Expression to evaluate. |
[out] | number | The number of nodes matching this xpath expression. |
DLL_EXPORT ReturnCode tixiXPathExpressionGetTextByIndex | ( | TixiDocumentHandle | handle, |
const char * | xPathExpression, | ||
int | elementNumber, | ||
char ** | text | ||
) |
Evaluates a XPath expression and returns the text content of the resultnode matching this xpath expression.
The element to get is selected by an index number, which should be between 1 and 'tixiXPathEvaluateNodeNumber() (inclusively)'. 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_xpath_expression_get_text_by_index( integer handle, character*n xpathERxpression, integer index, character*n text, integer error )
[in] | handle | handle as returned by tixiOpenDocument, tixiOpenDocumentRecursive, tixiOpenDocumentFromHTTP, tixiCreateDocument or tixiImportFromString |
[in] | xPathExpression | The XPath Expression to evaluate. |
[in] | elementNumber | The (index)-number to get. Needed if the XPath expression catches more than one node. Index must be between 1 and 'tixiXPathEvaluateNodeNumber()', inclusively. |
[out] | text | the text content of the node-value. Works for xml-elements and attributes. NULL if an error occured. |
DLL_EXPORT ReturnCode tixiXPathExpressionGetXPath | ( | TixiDocumentHandle | handle, |
const char * | xPathExpression, | ||
int | index, | ||
char ** | xPath | ||
) |
Evaluates a XPath expression and the xPath for the i-th result.
[in] | handle | handle as returned by tixiOpenDocument, tixiOpenDocumentRecursive, tixiOpenDocumentFromHTTP, tixiCreateDocument or tixiImportFromString |
[in] | xPathExpression | The XPath Expression to evaluate. |
[in] | index | The index of the result to query, with 1 <= index <= number, and number queried with tixiXPathEvaluateNodeNumber |
[out] | xPath | The xPath of the search result. |