TiXI  3.3.0
UID Helper Functions

Functions

DLL_EXPORT ReturnCode tixiUIDCheckDuplicates (TixiDocumentHandle handle)
 Performs a check over all UIDs and checks for duplicates. More...
 
DLL_EXPORT ReturnCode tixiUIDCheckLinks (TixiDocumentHandle handle)
 Performs a check over all nodes with the uID "isLink" and check if the corresponding uid exists in that data set. More...
 
DLL_EXPORT ReturnCode tixiUIDGetXPath (TixiDocumentHandle handle, const char *uID, char **xPath)
 Returns the XPath to given uID. More...
 
DLL_EXPORT ReturnCode tixiUIDCheckExists (TixiDocumentHandle handle, const char *uID)
 Checks if a uID exists. More...
 
DLL_EXPORT ReturnCode tixiUIDSetToXPath (TixiDocumentHandle handle, const char *xPath, const char *uID)
 Sets a uID attribute to a node, specified via its XPath. More...
 

Detailed Description

Function for UID management.

Function Documentation

DLL_EXPORT ReturnCode tixiUIDCheckDuplicates ( TixiDocumentHandle  handle)

Performs a check over all UIDs and checks for duplicates.

Fortran syntax:

tixi_uid_check_duplicates( integer handle, integer error )

Parameters
[in]handlehandle as returned by tixiOpenDocument, tixiOpenDocumentRecursive, tixiOpenDocumentFromHTTP, tixiCreateDocument or tixiImportFromString
Returns
  • SUCCESS if all UIDs are unique
  • FAILED if reading of uids does not work
  • UID_NOT_UNIQUE is there is a not unique UID
DLL_EXPORT ReturnCode tixiUIDCheckExists ( TixiDocumentHandle  handle,
const char *  uID 
)

Checks if a uID exists.

Fortran syntax:

tixi_uid_check_exists( integer handle, character*n uid, integer error )

Parameters
[in]handlehandle as returned by tixiOpenDocument, tixiOpenDocumentRecursive, tixiOpenDocumentFromHTTP, tixiCreateDocument or tixiImportFromString
[in]uIDThe uid which should be checked
Returns
  • SUCCESS if all UIDs are unique
  • UID_DONT_EXISTS if the UID do not exist in the document
  • UID_NOT_UNIQUE is there is a not unique UID
  • FAILED for internal error
DLL_EXPORT ReturnCode tixiUIDCheckLinks ( TixiDocumentHandle  handle)

Performs a check over all nodes with the uID "isLink" and check if the corresponding uid exists in that data set.

Fortran syntax:

tixi_uid_check_links( integer handle, integer error )

Parameters
[in]handlehandle as returned by tixiOpenDocument, tixiOpenDocumentRecursive, tixiOpenDocumentFromHTTP, tixiCreateDocument or tixiImportFromString
Returns
  • SUCCESS if all links are valid
  • FAILED if reading of links or uids does not work
  • UID_NOT_UNIQUE is there is a not unique UID
  • UID_LINK_BROKEN if there is a broken link.
DLL_EXPORT ReturnCode tixiUIDGetXPath ( TixiDocumentHandle  handle,
const char *  uID,
char **  xPath 
)

Returns the XPath to given uID.

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_uid_get_xpath( integer handle, character*n uid, character*n text, integer error )

Parameters
[in]handlehandle as returned by tixiOpenDocument, tixiOpenDocumentRecursive, tixiOpenDocumentFromHTTP, tixiCreateDocument or tixiImportFromString
[in]uIDThe uid of which the xpath should be returned
[out]xPathThe XPath of the element with the right uid. Empty string if uid does not exist.
Returns
  • SUCCESS if all UIDs are unique
  • UID_NOT_UNIQUE is there is a not unique UID
  • FAILED for internal error
DLL_EXPORT ReturnCode tixiUIDSetToXPath ( TixiDocumentHandle  handle,
const char *  xPath,
const char *  uID 
)

Sets a uID attribute to a node, specified via its XPath.

Fortran syntax:

tixi_uid_set_to_xpath( integer handle, character*n xpath, character*n uid, integer error )

Parameters
[in]handlehandle as returned by tixiOpenDocument, tixiOpenDocumentRecursive, tixiOpenDocumentFromHTTP, tixiCreateDocument or tixiImportFromString
[in]xPathThe XPath to the node which should become the uid-attribute
[in]uIDThe uid which should be checked
Returns
  • SUCCESS if all UIDs are unique
  • UID_DONT_EXISTS if the UID do not exist in the document
  • UID_NOT_UNIQUE is there is a not unique UID
  • 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
  • NO_ATTRIBUTE_NAME if attributeName is NULL
  • ELEMENT_PATH_NOT_UNIQUE if elementPath resolves not to a single element but to a list of elements
  • FAILED for internal error

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