TiXI  3.3.0
tixi.h File Reference

Go to the source code of this file.

Macros

#define DLL_EXPORT
 
#define DEPRECATED
 
#define TIXI_H
 

Typedefs

typedef int TixiDocumentHandle
 
typedef enum ReturnCode ReturnCode
 
typedef enum StorageMode StorageMode
 
typedef enum OpenMode OpenMode
 
typedef enum AddLinkMode AddLinkMode
 
typedef enum MessageType MessageType
 
typedef void(* TixiPrintMsgFnc) (MessageType type, const char *msg)
 

Enumerations

enum  ReturnCode {
  SUCCESS, FAILED, INVALID_XML_NAME, NOT_WELL_FORMED,
  NOT_SCHEMA_COMPLIANT, NOT_DTD_COMPLIANT, INVALID_HANDLE, INVALID_XPATH,
  ELEMENT_NOT_FOUND, INDEX_OUT_OF_RANGE, NO_POINT_FOUND, NOT_AN_ELEMENT,
  ATTRIBUTE_NOT_FOUND, OPEN_FAILED, OPEN_SCHEMA_FAILED, OPEN_DTD_FAILED,
  CLOSE_FAILED, ALREADY_SAVED, ELEMENT_PATH_NOT_UNIQUE, NO_ELEMENT_NAME,
  NO_CHILDREN, CHILD_NOT_FOUND, EROROR_CREATE_ROOT_NODE, DEALLOCATION_FAILED,
  NO_NUMBER, NO_ATTRIBUTE_NAME, STRING_TRUNCATED, NON_MATCHING_NAME,
  NON_MATCHING_SIZE, MATRIX_DIMENSION_ERROR, COORDINATE_NOT_FOUND, UNKNOWN_STORAGE_MODE,
  UID_NOT_UNIQUE, UID_DONT_EXISTS, UID_LINK_BROKEN, INVALID_NAMESPACE_URI,
  INVALID_NAMESPACE_PREFIX
}
 
enum  StorageMode { ROW_WISE, COLUMN_WISE }
 
enum  OpenMode { OPENMODE_PLAIN, OPENMODE_RECURSIVE }
 
enum  AddLinkMode { ADDLINK_CREATE, ADDLINK_CREATE_AND_OPEN }
 
enum  MessageType { MESSAGETYPE_ERROR, MESSAGETYPE_WARNING, MESSAGETYPE_STATUS }
 

Functions

DLL_EXPORT char * tixiGetVersion ()
 Returns the version number of this TIXI version. More...
 
DLL_EXPORT ReturnCode tixiOpenDocument (const char *xmlFilename, TixiDocumentHandle *handle)
 Open an XML-file for reading. More...
 
DLL_EXPORT ReturnCode tixiOpenDocumentRecursive (const char *xmlFilename, TixiDocumentHandle *handle, OpenMode oMode)
 Open an XML-file for reading. It acts like tixiOpenDocument. More...
 
DLL_EXPORT ReturnCode tixiOpenDocumentFromHTTP (const char *httpURL, TixiDocumentHandle *handle)
 Open an XML-file for reading from a http web resource. More...
 
DLL_EXPORT ReturnCode tixiCreateDocument (const char *rootElementName, TixiDocumentHandle *handle)
 Create an XML-document. More...
 
DLL_EXPORT ReturnCode tixiGetDocumentPath (TixiDocumentHandle handle, char **documentPath)
 Returns the file path to the document. More...
 
DLL_EXPORT ReturnCode tixiSaveDocument (TixiDocumentHandle handle, const char *xmlFilename)
 Write XML-document to disk. More...
 
DLL_EXPORT ReturnCode tixiSaveCompleteDocument (TixiDocumentHandle handle, const char *xmlFilename)
 Write XML-document with all external data to disk. More...
 
DLL_EXPORT ReturnCode tixiSaveAndRemoveDocument (TixiDocumentHandle handle, const char *xmlFilename)
 Write XML-document with all external data to disk. More...
 
DLL_EXPORT ReturnCode tixiCloseDocument (TixiDocumentHandle handle)
 Close an XML-document. More...
 
DLL_EXPORT ReturnCode tixiCloseAllDocuments ()
 Close all open documents. More...
 
DLL_EXPORT ReturnCode tixiCleanup ()
 Closes the xml2 library and frees its allocated variables. More...
 
DLL_EXPORT ReturnCode tixiExportDocumentAsString (const TixiDocumentHandle handle, char **text)
 Returns the Document as one text. More...
 
DLL_EXPORT ReturnCode tixiImportFromString (const char *xmlImportString, TixiDocumentHandle *handle)
 Imports a char-string into a new tixi-document. More...
 
DLL_EXPORT ReturnCode tixiSchemaValidateFromFile (const TixiDocumentHandle handle, const char *xsdFilename)
 Validate XML-document against an XML-schema. More...
 
DLL_EXPORT ReturnCode tixiSchemaValidateWithDefaultsFromFile (const TixiDocumentHandle handle, const char *xsdFilename)
 Validate XML-document against an XML-schema and insert missing default elements and attributes. More...
 
DLL_EXPORT ReturnCode tixiSchemaValidateFromString (const TixiDocumentHandle handle, const char *xsdString)
 Validate XML-document against an XML-schema. More...
 
DLL_EXPORT ReturnCode tixiDTDValidate (const TixiDocumentHandle handle, const char *DTDFilename)
 Validate XML-document against a DTD. More...
 
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...
 
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...
 
DLL_EXPORT ReturnCode tixiRegisterNamespace (const TixiDocumentHandle handle, const char *namespaceURI, const char *prefix)
 Registers the given namespace and its prefix. More...
 
DLL_EXPORT ReturnCode tixiRegisterNamespacesFromDocument (const TixiDocumentHandle handle)
 Registers all prefixed namespaces of the xml document to the parser. More...
 
DLL_EXPORT ReturnCode tixiSetElementNamespace (const TixiDocumentHandle handle, const char *elementPath, const char *namespaceURI, const char *prefix)
 This function sets the namespace for the specified element. More...
 
DLL_EXPORT ReturnCode tixiDeclareNamespace (const TixiDocumentHandle handle, const char *elementPath, const char *namespaceURI, const char *prefix)
 This function adds a namespace declaration inside the tag of specified element. More...
 
DLL_EXPORT ReturnCode tixiAddExternalLink (const TixiDocumentHandle handle, const char *parentPath, const char *pathOrUrl, const char *filename, AddLinkMode mode)
 Adds a link to an external xml file. More...
 
DLL_EXPORT ReturnCode tixiRemoveExternalLinks (TixiDocumentHandle handle)
 Removes all link attributes to external files. More...
 
DLL_EXPORT ReturnCode tixiAddHeader (const TixiDocumentHandle handle, const char *toolName, const char *version, const char *authorName)
 Add header to XML-file. More...
 
DLL_EXPORT ReturnCode tixiAddCpacsHeader (const TixiDocumentHandle handle, const char *name, const char *creator, const char *version, const char *description, const char *cpacsVersion)
 Add CPACS header to XML-file. More...
 
DLL_EXPORT ReturnCode tixiCheckElement (const TixiDocumentHandle handle, const char *elementPath)
 Checks if the given element exists. More...
 
DLL_EXPORT ReturnCode tixiCheckDocumentHandle (const TixiDocumentHandle handle)
 Checks for validity of a document handle. More...
 
DLL_EXPORT ReturnCode tixiUsePrettyPrint (TixiDocumentHandle handle, int usePrettyPrint)
 Sets Pretty print on or off. More...
 
DLL_EXPORT ReturnCode tixiSetPrintMsgFunc (TixiPrintMsgFnc func)
 Reroutes all messages of tixi to the message function func. More...
 
DLL_EXPORT TixiPrintMsgFnc tixiGetPrintMsgFunc ()
 Returns the currently registered message handler function. More...
 
DLL_EXPORT ReturnCode tixiSetCacheEnabled (TixiDocumentHandle handle, int enabled)
 Enables the internal xPath cache. More...
 
DLL_EXPORT ReturnCode tixiAddDoubleListWithAttributes (const TixiDocumentHandle handle, const char *parentPath, const char *listName, const char *childName, const char *childAttributeName, const double *values, const char *format, const char **attributes, int nValues)
 High level routine to write a list of elements with attributes. More...
 
DLL_EXPORT ReturnCode tixiGetVectorSize (const TixiDocumentHandle handle, const char *vectorPath, int *nElements)
 Retrieves the size of an Vector. More...
 
DLL_EXPORT ReturnCode tixiGetFloatVector (const TixiDocumentHandle handle, const char *vectorPath, double **vectorArray, const int eNumber)
 Retrieves a vector. More...
 
DEPRECATED DLL_EXPORT ReturnCode tixiGetArrayDimensions (const TixiDocumentHandle handle, const char *arrayPath, int *dimensions)
 Retrieves the number of dimensions of an Array. More...
 
DEPRECATED DLL_EXPORT ReturnCode tixiGetArrayDimensionSizes (const TixiDocumentHandle handle, const char *arrayPath, int *sizes, int *linearArraySize)
 Retrieves the sizes of all dimensions of the array definition, and the overall array size (product of all dimensions's sizes). More...
 
DEPRECATED DLL_EXPORT ReturnCode tixiGetArrayDimensionNames (const TixiDocumentHandle handle, const char *arrayPath, char **dimensionNames)
 Retrieves the names of all dimensions. More...
 
DEPRECATED DLL_EXPORT ReturnCode tixiGetArrayDimensionValues (const TixiDocumentHandle handle, const char *arrayPath, const int dimension, double *dimensionValues)
 Retrieves the selected dimension's values (e.g. separate allowed angles etc.). More...
 
DEPRECATED DLL_EXPORT ReturnCode tixiGetArrayParameters (const TixiDocumentHandle handle, const char *arrayPath, int *parameters)
 Retrieves the number of parameters of an array. More...
 
DEPRECATED DLL_EXPORT ReturnCode tixiGetArrayParameterNames (const TixiDocumentHandle handle, const char *arrayPath, char **parameterNames)
 Retrieves names of all parameters. More...
 
DEPRECATED DLL_EXPORT ReturnCode tixiGetArray (const TixiDocumentHandle handle, const char *arrayPath, const char *elementName, int arraySize, double **values)
 Reads in an array. The memory management of the array is done by tixi. More...
 
DEPRECATED DLL_EXPORT double tixiGetArrayValue (const double *array, const int *dimSize, const int *dimPos, const int dims)
 Getter function to take one multidimensionally specified element from a complete array, retrieved earlier. More...
 
DEPRECATED DLL_EXPORT ReturnCode tixiGetArrayElementCount (const TixiDocumentHandle handle, const char *arrayPath, const char *elementName, int *elements)
 Helper function. More...
 
DEPRECATED DLL_EXPORT ReturnCode tixiGetArrayElementNames (const TixiDocumentHandle handle, const char *arrayPath, const char *elementType, char **elementNames)
 Helper function. More...
 
DLL_EXPORT ReturnCode tixiAddPoint (const TixiDocumentHandle handle, const char *pointParentPath, double x, double y, double z, const char *format)
 Adds an element containing the 3D cartesian coordinates of a point. More...
 
DLL_EXPORT ReturnCode tixiGetPoint (const TixiDocumentHandle handle, const char *pointParentPath, double *x, double *y, double *z)
 Reads a point element but ignores error if an incomplete point is encountered. More...
 
DLL_EXPORT ReturnCode tixiCheckAttribute (TixiDocumentHandle handle, const char *elementPath, const char *attributeName)
 Checks the existence of an element's attribute. More...
 
DLL_EXPORT ReturnCode tixiXSLTransformationToString (TixiDocumentHandle handle, const char *xslFilename, char **resultText)
 Performs a XML transformation . More...
 
DLL_EXPORT ReturnCode tixiXSLTransformationToFile (TixiDocumentHandle handle, const char *xslFilename, const char *resultFilename)
 Performs a XML transformation and saves the result to resultFilename. More...
 
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...
 
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...
 

Macro Definition Documentation

◆ DEPRECATED

#define DEPRECATED

Definition at line 39 of file tixi.h.

◆ DLL_EXPORT

#define DLL_EXPORT

Definition at line 29 of file tixi.h.

◆ TIXI_H

#define TIXI_H

Definition at line 241 of file tixi.h.

Typedef Documentation

◆ AddLinkMode

typedef enum AddLinkMode AddLinkMode

Definition at line 404 of file tixi.h.

◆ MessageType

typedef enum MessageType MessageType

Definition at line 423 of file tixi.h.

◆ OpenMode

typedef enum OpenMode OpenMode

Definition at line 389 of file tixi.h.

◆ ReturnCode

typedef enum ReturnCode ReturnCode

Definition at line 348 of file tixi.h.

◆ StorageMode

typedef enum StorageMode StorageMode

Definition at line 368 of file tixi.h.

◆ TixiDocumentHandle

typedef int TixiDocumentHandle

Datatype for TixiDocumentHandle.

Definition at line 246 of file tixi.h.

◆ TixiPrintMsgFnc

typedef void(* TixiPrintMsgFnc) (MessageType type, const char *msg)

TixiPrintMsgFnc:

Parameters
[in]typeThe message type (error, warning, status)
[in]msgThe message
[in]...extra arguments

Signature of a callback function to handle messages (errors, warnings ...) To be used in conjuction with tixiSetPrintMsgFunc.

Definition at line 434 of file tixi.h.

Function Documentation

◆ tixiAddBooleanElement()

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

◆ tixiAddBooleanElementNS()

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

◆ tixiAddCpacsHeader()

DLL_EXPORT ReturnCode tixiAddCpacsHeader ( const TixiDocumentHandle  handle,
const char *  name,
const char *  creator,
const char *  version,
const char *  description,
const char *  cpacsVersion 
)

Add CPACS header to XML-file.

Inserts a header containing information on the data set in this file. If an strings equals to NULL an empty element is inserted. This routine should be called right after tixiCreateDocument. An timestamp is automaticly added to the header.

Fortran syntax:

tixi_add_cpacs_header( integer handle, character*n name, character*n creator, character*n version, character*n descripton, character*n cpacs_version, integer error )

Parameters
[in]handleas returned by tixiCreateDocument
[in]namename of the data set
[in]creatorstring to identify the creator of the file
[in]versionstring to identify the version of the file
[in]descriptionoptional string to set a description to the file
[in]cpacsVersionCPACS version number
Returns
  • SUCCESS if successfully added the header
  • FAILED if an internal error occured
  • INVALID_HANDLE if the handle is not valid
  • ALREADY_SAVED if the header should be added to an already saved document

◆ tixiAddDoubleAttribute()

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 )

Parameters
[in]handlefile handle as returned by tixiOpenDocument or tixiCreateDocument
[in]elementPathan XPath compliant path to an element in the document specified by handle (see section XPath Examples above).
[in]attributeNamename of the attribute to be added to the element. The name can also consist of a namespace prefix + ":" + the attribute name.
[in]numberfloating point value to be assigned to the attribute. If number is NULL an error is return and the attribute is not 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
  • NO_NUMBER if number is NULL
  • 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
  • INVALID_NAMESPACE_PREFIX if the prefix in attributeName does not match to a namespace

◆ tixiAddDoubleElement()

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

◆ tixiAddDoubleElementNS()

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

◆ tixiAddDoubleListWithAttributes()

DLL_EXPORT ReturnCode tixiAddDoubleListWithAttributes ( const TixiDocumentHandle  handle,
const char *  parentPath,
const char *  listName,
const char *  childName,
const char *  childAttributeName,
const double *  values,
const char *  format,
const char **  attributes,
int  nValues 
)

High level routine to write a list of elements with attributes.

Adds a list of elements with the same name containd in an element with the name listName to the element specified by parentPath.

Fortran syntax:

tixi_add_double_list_with_attributes( integer handle, character*n parent_path, character*n list_name, character*n child_name, character*n child_attribute_name, real values, character*n format, character*n attributes, integer n_values, 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).
[in]listNamename of the element containing the list
[in]childNamename of the child elements of the element listName
[in]childAttributeNamename of the attribute to be assigned to each child
[in]valuesarray of double holding the element values to be added ("text" content between the tags)
[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.
[in]attributesarray of pointers to strings holding the attribute values (vs. attribute name which is the same for each list entry)
[in]nValuesnumber of values in the list
Returns
  • SUCCESS if the list has been added successfully
  • FAILED if an internal error occured
  • INVALID_HANDLE if the handle is not valid, i.e. does not or no longer exist
  • INVALID_XPATH if parentPath is not a well-formed XPath-expression
  • ELEMENT_NOT_FOUND if parentPath does not point to a node in the XML-document
  • ELEMENT_PATH_NOT_UNIQUE if parentPath resolves not to a single element

◆ tixiAddExternalLink()

DLL_EXPORT ReturnCode tixiAddExternalLink ( const TixiDocumentHandle  handle,
const char *  parentPath,
const char *  pathOrUrl,
const char *  filename,
AddLinkMode  mode 
)

Adds a link to an external xml file.

The file is linked in the XML as

<externaldata>
      <path>https://dlr.de/myxmlstore</path>
      <filename>externaldata-included-1.xml</filename>
</externaldata>

Note: the linked external file is not automatically loaded into the document.

Fortran syntax:

tixi_add_external_link( integer handle, character*n parent_path, character*n path, character*n filename, integer error )

Parameters
[in]handleas returned by tixiCreateDocument
[in]parentPathThe Path to the element into which the element holding the url should be inserted.
[in]pathOrUrlThe parent path or url to the file.
[in]filenameThe actual name of the xml file.
[in]modeMode whether to create only the link or load the files into the document.
Returns
  • SUCCESS if successfully added the header
  • FAILED if an internal error occured
  • INVALID_HANDLE if the handle is not valid
  • ALREADY_SAVED if the header should be added to an already saved document

◆ tixiAddFloatVector()

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

◆ tixiAddHeader()

DLL_EXPORT ReturnCode tixiAddHeader ( const TixiDocumentHandle  handle,
const char *  toolName,
const char *  version,
const char *  authorName 
)

Add header to XML-file.

Inserts a header containing information on the tool used to create the file, its version and the user. Additionally, the TIXI version is inserted. If an strings equals to NULL an empty element is inserted. This routine shold be called right after tixiCreateDocument.

Fortran syntax:

tixi_add_header( integer handle, character*n tool_name, character*n version, character*n author_name, integer error )

Parameters
[in]handleas returned by tixiCreateDocument
[in]toolNamename of the tool used to write the file
[in]authorNamestring to identify the creator of the file
[in]versionstring to identify the version of the tool
Returns
  • SUCCESS if successfully added the header
  • FAILED if an internal error occured
  • INVALID_HANDLE if the handle is not valid
  • ALREADY_SAVED if the header should be added to an already saved document

◆ tixiAddIntegerAttribute()

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 )

Parameters
[in]handlefile handle as returned by tixiOpenDocument or tixiCreateDocument
[in]elementPathan XPath compliant path to an element in the document specified by handle (see section XPath Examples above).
[in]attributeNamename of the attribute to be added to the element. The name can also consist of a namespace prefix + ":" + the attribute name.
[in]numberinteger value to be assigned to the attribute. If number is NULL an error is return and the attribute is not 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
  • NO_NUMBER if number is NULL
  • 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
  • INVALID_NAMESPACE_PREFIX if the prefix in attributeName does not match to a namespace

◆ tixiAddIntegerElement()

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

◆ tixiAddIntegerElementNS()

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

◆ tixiAddPoint()

DLL_EXPORT ReturnCode tixiAddPoint ( const TixiDocumentHandle  handle,
const char *  pointParentPath,
double  x,
double  y,
double  z,
const char *  format 
)

Adds an element containing the 3D cartesian coordinates of a point.

An element with the following structure is added:

  <x> </x>
  <y> </y>
  <z> </z>

Fortran syntax:

tixi_add_point( integer handle, character*n pointParentPath, real x, real y, real z, character*n format, integer error )

Parameters
[in]handleas returned by tixiOpenDocument, tixiOpenDocumentRecursive, tixiOpenDocumentFromHTTP, tixiCreateDocument or tixiImportFromString
[in]pointParentPathan XPath compliant path to an element into which the point elements are to be inserted in the document specified by handle (see section XPath Examples).
[in]xx coordinate of the point
[in]yy coordinate of the point
[in]zz coordinate of the point
[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 point element
  • INVALID_HANDLE if the handle is not valid
  • INVALID_XPATH if pointParentPath is not a well-formed XPath-expression
  • ELEMENT_PATH_NOT_UNIQUE if pointParentPath resolves not to a single element but to a list of elements
  • ELEMENT_NOT_FOUND if pointParentPath points to a non-existing element
  • ALREADY_SAVED if element should be added to an already saved document

◆ tixiAddTextAttribute()

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 )

Parameters
[in]handlefile handle as returned by tixiOpenDocument or tixiCreateDocument
[in]elementPathan XPath compliant path to an element in the document specified by handle (see section XPath Examples above).
[in]attributeNamename of the attribute to be added to the element. The name can also consist of a namespace prefix + ":" + the attribute name.
[in]attributeValuetext to assigned to the attribute. If attributeValue is NULL the empty string will be assigned to the attribute.
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
  • 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
  • ALREADY_SAVED if element should be added to an already saved document
  • INVALID_XML_NAME if attributeName is not a valid XML-element name
  • INVALID_NAMESPACE_PREFIX if the prefix in attributeName does not match to a namespace

◆ tixiAddTextElement()

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

◆ tixiAddTextElementAtIndex()

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

◆ tixiAddTextElementNS()

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

◆ tixiAddTextElementNSAtIndex()

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

◆ tixiCheckAttribute()

DLL_EXPORT ReturnCode tixiCheckAttribute ( TixiDocumentHandle  handle,
const char *  elementPath,
const char *  attributeName 
)

Checks the existence of an element's attribute.

Fortran syntax:

tixi_check_attribute( integer handle, character*n element_path, character*n attribute_name, 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).
[in]attributeNamename of the attribute to be added to the element
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
  • ATTRIBUTE_NOT_FOUND if the element has no attribute attributeName
  • 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

◆ tixiCheckDocumentHandle()

DLL_EXPORT ReturnCode tixiCheckDocumentHandle ( const TixiDocumentHandle  handle)

Checks for validity of a document handle.

Fortran syntax:

tixi_check_handle( integer handle )

Parameters
[in]handlehandle as returned by tixiCreateDocument, tixiOpenDocumentRecursive or tixiOpenDocumentFromHTTP
Returns
  • SUCCESS if handle is valid
  • INVALID_HANDLE if the handle is not valid, i.e. does not or no longer exist

◆ tixiCheckElement()

DLL_EXPORT ReturnCode tixiCheckElement ( const TixiDocumentHandle  handle,
const char *  elementPath 
)

Checks if the given element exists.

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).
Returns
  • SUCCESS if the element exists
  • INVALID_HANDLE if the handle is not valid, i.e. does not or no longer exist
  • FAILED internal error
  • INVALID_XPATH if elementPath is not a well-formed XPath-expression
  • ELEMENT_NOT_FOUND if the elementPath does not point to an existing element

◆ tixiCleanup()

DLL_EXPORT ReturnCode tixiCleanup ( )

Closes the xml2 library and frees its allocated variables.

◆ tixiCloseAllDocuments()

DLL_EXPORT ReturnCode tixiCloseAllDocuments ( )

Close all open documents.

Closes all XML-documents. This routine could be called at the of a program to free allocated memory. After calling this routine all current handles are invalid and no further processing of the document is possible.

Fortran syntax:

tixi_close_all_documents( integer error )

Returns
  • SUCCESS if successfully closed the XML-file
  • CLOSE_FAILED if closing the XML-files failed

◆ tixiCloseDocument()

DLL_EXPORT ReturnCode tixiCloseDocument ( TixiDocumentHandle  handle)

Close an XML-document.

Closes an XML-document. This routine should be called after the processing of an XML-document is completed. After calling this routine the handle is invalid and no further processing of the document is possible. It must be called after tixiSaveDocument.

Fortran syntax:

tixi_close_document( integer handle, integer error )

Parameters
[in]handlefile handle as returned by tixiOpenDocument, tixiOpenDocumentRecursive, tixiOpenDocumentFromHTTP, tixiCreateDocument or tixiImportFromString
Returns
  • SUCCESS if successfully closed the XML-file
  • INVALID_HANDLE if handle not found in list of man
  • CLOSE_FAILED if closing the XML-file failed

◆ tixiCreateDocument()

DLL_EXPORT ReturnCode tixiCreateDocument ( const char *  rootElementName,
TixiDocumentHandle handle 
)

Create an XML-document.

Initializes a data structure to hold an XML-document.

Fortran syntax:

tixi_create_document( character*n root_element_name, integer handle, integer error )

Parameters
[in]rootElementNamename of the root element of the XML-document
[out]handlehandle to an XML-document. This handle is used in calls to other TIXI functions.
Returns
  • SUCCESS if data structure is set-up successfully
  • FAILED if data structure could not created

◆ tixiCreateElement()

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

◆ tixiCreateElementAtIndex()

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

◆ tixiCreateElementNS()

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

◆ tixiCreateElementNSAtIndex()

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

◆ tixiDeclareNamespace()

DLL_EXPORT ReturnCode tixiDeclareNamespace ( const TixiDocumentHandle  handle,
const char *  elementPath,
const char *  namespaceURI,
const char *  prefix 
)

This function adds a namespace declaration inside the tag of specified element.

This function can be used, after an element was created or read from file to set the namespace of the element.

The namespace is not applied to the element, but can be used from child nodes.

Different to tixiSetElementNamespace the namespace prefix may not be empty!

Fortran syntax:

tixi_add_namespace_attribute( integer handle, character*n element_path, character*n namespace_uri, character*n prefix, integer error )

Returns
  • SUCCESS if the namespace could be set successfully
  • INVALID_HANDLE if the handle is not valid, i.e. does not or no longer exist
  • INVALID_NAMESPACE_URI if the namespace URI is invalid
  • ELEMENT_NOT_FOUND if the element at elementPath does not exist
  • INVALID_XPATH if elementPath is not a well-formed XPath-expression
  • ELEMENT_PATH_NOT_UNIQUE if elementPath resolves not to a single element but to a list of elements
  • FAILED If the prefix is empty or the namespace could not be set due to another error.

◆ tixiDTDValidate()

DLL_EXPORT ReturnCode tixiDTDValidate ( const TixiDocumentHandle  handle,
const char *  DTDFilename 
)

Validate XML-document against a DTD.

Validates an XML-document against a DTD specified by DTDFilename. This routine is to be called after opening a document by tixiOpenDocument and before tixiSaveDocument if the validation against a DTD is desired for the input file and the output file, respectively.

Fortran syntax:

tixi_dtd_validate( integer handle, character*n dtd_filename, integer error )

Parameters
[in]DTDFilenamename of the DTD-file to be used
[in]handlehandle to the XML-document to be validated.
Returns
  • SUCCESS if the document is successfully validated
  • NOT_WELL_FORMED if the XML-document is not well formed
  • NOT_DTD_COMPLIANT if the XML-document is well-formed but validating against the given DTD fails
  • OPEN_DTD_FAILED if opening of the DTD-file failed

◆ tixiExportDocumentAsString()

DLL_EXPORT ReturnCode tixiExportDocumentAsString ( const TixiDocumentHandle  handle,
char **  text 
)

Returns the Document as one text.

Returns the text content of 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_document_as_string( integer handle, character*n text, integer error )

Parameters
[in]handlehandle as returned by tixiOpenDocument, tixiOpenDocumentRecursive, tixiOpenDocumentFromHTTP, tixiCreateDocument or tixiImportFromString
[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

◆ tixiExportElementAsString()

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

◆ tixiGetArray()

DEPRECATED DLL_EXPORT ReturnCode tixiGetArray ( const TixiDocumentHandle  handle,
const char *  arrayPath,
const char *  elementName,
int  arraySize,
double **  values 
)

Reads in an array. The memory management of the array is done by tixi.

DEPRECATED: This is a CPACS specific function, that is no longer needed in CPACS versions >= 3.

For an array use example, please check tixiGetArrayDimensions()

Fortran syntax:

tixi_get_array ( integer handle, character*n arrayPath, character*n element, double *values)

Parameters
[in]handlefile handle as returned by tixiOpenDocument, tixiOpenDocumentRecursive, tixiOpenDocumentFromHTTP, tixiCreateDocument or tixiImportFromString
[in]arrayPathan XPath compliant path to an element holding the sub-tags of the array definition in the document specified by handle (see section XPath Examples).
[in]elementNamename of the sub tag that contains the array
[in]arraySizeTotal size of the array. Size must be determined by calling tixiGetArrayDimensionSizes and must equal the product of all dimensions' sizes
[out]valuesPointer to a double array, containg all values for this dimension. The array is allocated and freed by tixi. The size of the array corresponds to the parameter arraySize
Returns
  • SUCCESS if successfully read the matrix element
  • FAILED internal error
  • INVALID_HANDLE if the handle is not valid
  • INVALID_XPATH if matrixPath is not a well-formed XPath-expression
  • ATTRIBUTE_NOT_FOUND if the given sub element has not mapType="array"
  • ELEMENT_PATH_NOT_UNIQUE if matrixPath resolves not to a single element but to a list of elements
  • ELEMENT_NOT_FOUND if arrayPath points to a element that is no array
  • NON_MATCHING_SIZE if arraySize does not match number of read elements in specified array

◆ tixiGetArrayDimensionNames()

DEPRECATED DLL_EXPORT ReturnCode tixiGetArrayDimensionNames ( const TixiDocumentHandle  handle,
const char *  arrayPath,
char **  dimensionNames 
)

Retrieves the names of all dimensions.

DEPRECATED: This is a CPACS specific function, that is no longer needed in CPACS versions >= 3.

For an array use example, please check tixiGetArrayDimensions()

Fortran syntax:

tixi_get_array_dimension_names ( integer handle, character*n arrayPath, char*n*m dimensionNames)

Parameters
[in]handlefile handle as returned by tixiOpenDocument, tixiOpenDocumentRecursive, tixiOpenDocumentFromHTTP, tixiCreateDocument or tixiImportFromString
[in]arrayPathan XPath compliant path to an element holding the sub-tags of the array definition in the document specified by handle (see section XPath Examples).
[out]dimensionNamesarray of strings
Returns
  • SUCCESS if successfully read the matrix element
  • FAILED internal error
  • INVALID_HANDLE if the handle is not valid
  • INVALID_XPATH if matrixPath is not a well-formed XPath-expression
  • ELEMENT_PATH_NOT_UNIQUE if matrixPath resolves not to a single element but to a list of elements
  • ELEMENT_NOT_FOUND if arrayPath points to a element that is no array

◆ tixiGetArrayDimensions()

DEPRECATED DLL_EXPORT ReturnCode tixiGetArrayDimensions ( const TixiDocumentHandle  handle,
const char *  arrayPath,
int *  dimensions 
)

Retrieves the number of dimensions of an Array.

DEPRECATED: This is a CPACS specific function, that is no longer needed in CPACS versions >= 3.

Returns the number of separate dimensions defined in sub-tags of the array in CPACS. For each dimension there is a finite set of allowed values that can be retrieved by "tixiGetArrayValues".

Example:

<aeroPerformanceMap>
<machNumber mapType="vector">0.2;0.6</machNumber>
<reynoldsNumber mapType="vector">10000000;30000000</reynoldsNumber>
<angleOfYaw mapType="vector">-5.;0;15</angleOfYaw>
<angleOfAttack mapType="vector">-4.;-2.;0.;2.;4.;6.;8.;10.;12.;14.;16.</angleOfAttack>
<cfx mapType="array">...</array>
<cfy mapType="array">...</array>
<cfz mapType="array"/>
<cmx mapType="array"/>
<cmy mapType="array"/>
<cmz mapType="array"/>
</aeroPerformanceMap>

This is a typical array definition, to be found under, e.g., the xpath "//aeroPerformanceMap":

  • All direct child tags with the attribute 'mapType="vector"' define one dimension each, containing several ";" separated values.
  • All direct child tags with the attribute 'mapType="array"' define a list of values, the list having a size of the cross product of all dimensions' sizes (in this example 2*2*3*11 = 132 elements per "array" list).

Fortran syntax:

tixi_get_array_dimensions( integer handle, character*n arrayPath, integer* dimensions )

Parameters
[in]handleas returned by tixiCreateDocument
[in]arrayPathan XPath-compliant path to an element holding the sub elements that define the dimensions in the document specified by the handle (see section XPath Examples).
[out]dimensionsnumber of array dimensions
Returns
  • SUCCESS if the dimensions have been successfully read
  • FAILED for internal errors
  • INVALID_HANDLE if the handle is not valid
  • INVALID_XPATH if arrayPath is not a well-formed XPath-expression
  • ELEMENT_PATH_NOT_UNIQUE if arrayPath resolves not to a single element but to a list of elements
  • ELEMENT_NOT_FOUND if the rrayPath points to a element that is no array

◆ tixiGetArrayDimensionSizes()

DEPRECATED DLL_EXPORT ReturnCode tixiGetArrayDimensionSizes ( const TixiDocumentHandle  handle,
const char *  arrayPath,
int *  sizes,
int *  linearArraySize 
)

Retrieves the sizes of all dimensions of the array definition, and the overall array size (product of all dimensions's sizes).

DEPRECATED: This is a CPACS specific function, that is no longer needed in CPACS versions >= 3.

For an array use example, please check tixiGetArrayDimensions()

Fortran syntax:

tixi_get_array_dimension_sizes ( integer handle, character*n arrayPath, int*n sizes, int* arraySizes )

Parameters
[in]handleas returned by tixiCreateDocument
[in]arrayPathan XPath-compliant path to the top XML element holding the sub-tags of the array definition in the document specified by the handle (see section XPath Examples).
[out]sizesan integer array containing the size of each dimension
[out]linearArraySizeproduct over all sizes (for complete array size)
Returns
  • SUCCESS if the dimensions have been successfully read
  • FAILED internal error
  • INVALID_HANDLE if the handle is not valid
  • INVALID_XPATH if matrixPath is not a well-formed XPath-expression
  • ELEMENT_PATH_NOT_UNIQUE if matrixPath resolves not to a single element but to a list of elements
  • ELEMENT_NOT_FOUND if the arrayPath points to a element that is no array

◆ tixiGetArrayDimensionValues()

DEPRECATED DLL_EXPORT ReturnCode tixiGetArrayDimensionValues ( const TixiDocumentHandle  handle,
const char *  arrayPath,
const int  dimension,
double *  dimensionValues 
)

Retrieves the selected dimension's values (e.g. separate allowed angles etc.).

DEPRECATED: This is a CPACS specific function, that is no longer needed in CPACS versions >= 3.

For an array use example, please check tixiGetArrayDimensions()

Fortran syntax:

tixi_get_array_dimension_values ( integer handle, character*n arrayPath, int* dimension, double *dimensionValues)

Parameters
[in]handlefile handle as returned by tixiOpenDocument, tixiOpenDocumentRecursive, tixiOpenDocumentFromHTTP, tixiCreateDocument or tixiImportFromString
[in]arrayPathan XPath compliant path to an element holding the sub-tags of the array definition in the document specified by handle (see section XPath Examples).
[in]dimensionwhich dimension to return meaning values for
[out]dimensionValuesall values for this dimension. The return array's Size should be determined by a prior call to tixiGetArrayDimensionSizes()
Returns
  • SUCCESS if successfully read the matrix element
  • FAILED internal error
  • INVALID_HANDLE if the handle is not valid
  • INVALID_XPATH if matrixPath is not a well-formed XPath-expression
  • ELEMENT_PATH_NOT_UNIQUE if matrixPath resolves not to a single element but to a list of elements
  • ELEMENT_NOT_FOUND if arrayPath points to a element that is no array

◆ tixiGetArrayElementCount()

DEPRECATED DLL_EXPORT ReturnCode tixiGetArrayElementCount ( const TixiDocumentHandle  handle,
const char *  arrayPath,
const char *  elementName,
int *  elements 
)

Helper function.

DEPRECATED: This is a CPACS specific function, that is no longer needed in CPACS versions >= 3.

Returns the number of sub elements in CPACS arrays (either vector or array type).

For an array use example, please check tixiGetArrayDimensions(). The result for elementName="angleOfAttack" would be 11.

Fortran syntax:

tixi_get_array_element_count( integer handle, character*n arrayPath, character*n elementName, integer* elements )

Parameters
[in]handleas returned by tixiCreateDocument
[in]arrayPathan XPath compliant path to an element holding the sub elements that define the dimensions in the document specified by handle (see section XPath Examples).
[in]elementNameThe name of the sub element under the given xpath.
[out]elementsnumber of array parameters (separated by ";")
Returns
  • SUCCESS if successfully read the dimensions
  • FAILED internal error
  • INVALID_HANDLE if the handle is not valid
  • INVALID_XPATH if arrayPath is not a well-formed XPath-expression
  • ELEMENT_PATH_NOT_UNIQUE if arrayPath resolves not to a single element but to a list of elements
  • ELEMENT_NOT_FOUND if arrayPath points to a element that is no array

◆ tixiGetArrayElementNames()

DEPRECATED DLL_EXPORT ReturnCode tixiGetArrayElementNames ( const TixiDocumentHandle  handle,
const char *  arrayPath,
const char *  elementType,
char **  elementNames 
)

Helper function.

DEPRECATED: This is a CPACS specific function, that is no longer needed in CPACS versions >= 3.

Returns the tag names of sub elements of mapType given.

For an array use example, please check tixiGetArrayDimensions()

Fortran syntax:

tixi_get_array_element_names( integer handle, character*n arrayPath, character*n elementName, character*n*m elementNames)

Parameters
[in]handleas returned by tixiCreateDocument
[in]arrayPathan XPath compliant path to an element holding the sub elements that define the dimensions in the document specified by handle (see section XPath Examples).
[in]elementTypemapType to get names for (either "vector" for a dimension or "array" for the data field)
[out]elementNamesstring names of all tags found for the given type.
Returns
  • SUCCESS if successfully read the dimensions
  • FAILED internal error
  • INVALID_HANDLE if the handle is not valid
  • INVALID_XPATH if arrayPath is not a well-formed XPath-expression
  • ELEMENT_PATH_NOT_UNIQUE if arrayPath resolves not to a single element but to a list of elements
  • ELEMENT_NOT_FOUND if arrayPath points to a element that is no array

◆ tixiGetArrayParameterNames()

DEPRECATED DLL_EXPORT ReturnCode tixiGetArrayParameterNames ( const TixiDocumentHandle  handle,
const char *  arrayPath,
char **  parameterNames 
)

Retrieves names of all parameters.

DEPRECATED: This is a CPACS specific function, that is no longer needed in CPACS versions >= 3.

For an array use example, please check tixiGetArrayDimensions()

Fortran syntax:

tixi_get_array_parameter_names ( integer handle, character*n arrayPath, character*n*m parameterNames)

Parameters
[in]handleas returned by tixiCreateDocument
[in]arrayPathan XPath compliant path to an element holding the sub-tags of the array definition in the document specified by handle (see section XPath Examples).
[out]parameterNamesstring array containing names of each parameter
Returns
  • SUCCESS if successfully read the matrix element
  • FAILED internal error
  • INVALID_HANDLE if the handle is not valid
  • INVALID_XPATH if matrixPath is not a well-formed XPath-expression
  • ELEMENT_PATH_NOT_UNIQUE if matrixPath resolves not to a single element but to a list of elements
  • ELEMENT_NOT_FOUND if arrayPath points to a element that is no array

◆ tixiGetArrayParameters()

DEPRECATED DLL_EXPORT ReturnCode tixiGetArrayParameters ( const TixiDocumentHandle  handle,
const char *  arrayPath,
int *  parameters 
)

Retrieves the number of parameters of an array.

DEPRECATED: This is a CPACS specific function, that is no longer needed in CPACS versions >= 3.

For an array use example, please check tixiGetArrayDimensions()

Returns the number of different parameters (cutting all dimensions) defined in sub-tags in CPACS. Parameters are the tags with the attribute 'mapType="array"'.

Fortran syntax:

tixi_get_array_parameters( integer handle, character*n arrayPath, integer* parameters )

Parameters
[in]handleas returned by tixiCreateDocument
[in]arrayPathan XPath compliant path to an element holding the sub elements that define the dimensions in the document specified by handle (see section XPath Examples).
[out]parametersnumber of array parameters
Returns
  • SUCCESS if successfully read the dimensions
  • FAILED internal error
  • INVALID_HANDLE if the handle is not valid
  • INVALID_XPATH if arrayPath is not a well-formed XPath-expression
  • ELEMENT_PATH_NOT_UNIQUE if arrayPath resolves not to a single element but to a list of elements
  • ELEMENT_NOT_FOUND if arrayPath points to a element that is no array

◆ tixiGetArrayValue()

DEPRECATED DLL_EXPORT double tixiGetArrayValue ( const double *  array,
const int *  dimSize,
const int *  dimPos,
const int  dims 
)

Getter function to take one multidimensionally specified element from a complete array, retrieved earlier.

DEPRECATED: This is a CPACS specific function, that is no longer needed in CPACS versions >= 3.

For an array use example, please check tixiGetArrayDimensions()

Fortran syntax:

tixi_get_array_value ( double*n array, integer*n dimSize, integer*n dimPos, integer *dims)

Parameters
[in]arraythe array as returned by tixiGetArray()
[in]dimSizethe array of dimensions' sizes as returned by tixiGetArrayDimensionSizes()
[in]dimPosthe index of each dimension to fetch from the array
[in]dimsthe number of dimensions of the array as returned by tixiGetArrayDimensions()
Returns
The element fetched

◆ tixiGetAttributeName()

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 )

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).
[in]attrIndexnumber index of the attribute of the given path (counting from 1...tixiGetNumberOfAttributes)
[out]attrNameString containing the attribute name.
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

◆ tixiGetBooleanAttribute()

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 )

Parameters
[in]handlehandle as returned by tixiOpenDocument or tixiCreateDocument
[in]elementPathan XPath compliant path to an element in the document specified by handle (see section XPath Examples above).
[in]attributeNamename of the attribute to be added to the element. The name can also consist of a namespace prefix + ":" + the attribute name.
[out]booleanvalue of the specified attribute as an boolean value
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
  • ATTRIBUTE_NOT_FOUND if the element has no attribute attributeName
  • 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
  • INVALID_NAMESPACE_PREFIX if the prefix in attributeName does not match to a namespace

◆ tixiGetBooleanElement()

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

◆ tixiGetChildNodeName()

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

◆ tixiGetDocumentPath()

DLL_EXPORT ReturnCode tixiGetDocumentPath ( TixiDocumentHandle  handle,
char **  documentPath 
)

Returns the file path to the document.

The path is empty, if the document was not opened, but created by tixiCreateDocument.

Parameters
[in]handledocument handle as returned by tixiOpenDocument, tixiOpenDocumentRecursive, tixiOpenDocumentFromHTTP, tixiCreateDocument or tixiImportFromString
[out]documentPathPath to the file, opened by tixiOpenDocument, tixiOpenDocumentRecursive, tixiOpenDocumentFromHTTP The path is a null pointer, if the document was created by tixiCreateDocument or tixiImportFromString
Returns
  • SUCCESS in case of no errors.
  • FAILED if documentPath is a null pointer.
  • INVALID_HANDLE if the document handle is invalid.

◆ tixiGetDoubleAttribute()

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 )

Parameters
[in]handlehandle as returned by tixiOpenDocument or tixiCreateDocument
[in]elementPathan XPath compliant path to an element in the document specified by handle (see section XPath Examples above).
[in]attributeNamename of the attribute to be added to the element. The name can also consist of a namespace prefix + ":" + the attribute name.
[out]numbervalue of the specified attribute as a floating point value
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
  • ATTRIBUTE_NOT_FOUND if the element has no attribute attributeName
  • 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
  • INVALID_NAMESPACE_PREFIX if the prefix in attributeName does not match to a namespace

◆ tixiGetDoubleElement()

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

◆ tixiGetFloatVector()

DLL_EXPORT ReturnCode tixiGetFloatVector ( const TixiDocumentHandle  handle,
const char *  vectorPath,
double **  vectorArray,
const int  eNumber 
)

Retrieves a vector.

A vector is read and its contents are stored into an 1D-array. The memory necessary for the array is automatically allocated. The number of elements in the vector could be read via a call to "tixiGetVectorSize".

tixi_get_float_vector( integer handle, character*n vectorPath, real array, integer eNumber)

Parameters
[in]handlefile handle as returned by tixiOpenDocument, tixiOpenDocumentRecursive, tixiOpenDocumentFromHTTP, tixiCreateDocument or tixiImportFromString
[in]vectorPathan XPath compliant path to an element holding the vector in the document specified by handle (see section XPath Examples).
[out]vectorArraya pointer address for an array that should hold the vector elements
[in]eNumbermaximal number of elements that shout be read from this vector.
Returns
  • SUCCESS if successfully read the vector
  • FAILED internal error
  • INVALID_HANDLE if the handle is not valid
  • INVALID_XPATH if matrixPath is not a well-formed XPath-expression
  • ELEMENT_PATH_NOT_UNIQUE if vectorPath resolves not to a single element but to a list of elements
  • ELEMENT_NOT_FOUND if vectorPath points to a non-existing element

◆ tixiGetIntegerAttribute()

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 )

Parameters
[in]handlehandle as returned by tixiOpenDocument or tixiCreateDocument
[in]elementPathan XPath compliant path to an element in the document specified by handle (see section XPath Examples above).
[in]attributeNamename of the attribute to be added to the element. The name can also consist of a namespace prefix + ":" + the attribute name.
[out]numbervalue of the specified attribute as an integer value
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
  • ATTRIBUTE_NOT_FOUND if the element has no attribute attributeName
  • 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
  • INVALID_NAMESPACE_PREFIX if the prefix in attributeName does not match to a namespace

◆ tixiGetIntegerElement()

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

◆ tixiGetNamedChildrenCount()

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

◆ tixiGetNodeType()

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

◆ tixiGetNumberOfAttributes()

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 )

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]nAttributesNumber of attributes of a given 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

◆ tixiGetNumberOfChilds()

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

◆ tixiGetPoint()

DLL_EXPORT ReturnCode tixiGetPoint ( const TixiDocumentHandle  handle,
const char *  pointParentPath,
double *  x,
double *  y,
double *  z 
)

Reads a point element but ignores error if an incomplete point is encountered.

An element with the following structure is expected as child of the element specified by pointParentPath

  <x> </x>
  <y> </y>
  <z> </z>

Reads a point element.

An element with the following structure is expected as child of the element specified by pointParentPath. Some or even all coordinate entries may be missing. The value of a missing coordiante is unchanged on output. This feature can be used to provide default values for non existing coordinate elements.

The coordinates are returned in the x, y, and z arguments.

Fortran syntax:

tixi_get_point( integer handle, character*n pointParentPath, integer index, real x, real y, real z, integer error )

Parameters
[in]handleas returned by tixiOpenDocument
[in]pointParentPathan XPath compliant path to an element containing point elements in the document specified by handle (see section XPath Examples).
[out]xx coordinate of the point
[out]yy coordinate of the point
[out]zz coordinate of the point
Returns
  • SUCCESS if the content of the point element is retrieved successfully
  • INVALID_HANDLE if the handle is not valid, i.e. does not or no longer exist
  • INVALID_XPATH if pointParentPath is not a well-formed XPath-expression
  • ELEMENT_NOT_FOUND if pointParentPath does not point to a node in the XML-document
  • ELEMENT_PATH_NOT_UNIQUE if pointParentPath resolves not to a single element but to a list of elements

◆ tixiGetPrintMsgFunc()

DLL_EXPORT TixiPrintMsgFnc tixiGetPrintMsgFunc ( )

Returns the currently registered message handler function.

Returns
  • Function pointer to the message handler

◆ tixiGetTextAttribute()

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 )

Parameters
[in]handlehandle as returned by tixiOpenDocument or tixiCreateDocument
[in]elementPathan XPath compliant path to an element in the document specified by handle (see section XPath Examples above).
[in]attributeNamename of the attribute to be added to the element. The name can also consist of a namespace prefix + ":" + the attribute name.
[out]textvalue of the specified attribute as a 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
  • ATTRIBUTE_NOT_FOUND if the element has no attribute attributeName
  • 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
  • INVALID_NAMESPACE_PREFIX if the prefix in attributeName does not match to a namespace

◆ tixiGetTextElement()

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

◆ tixiGetVectorSize()

DLL_EXPORT ReturnCode tixiGetVectorSize ( const TixiDocumentHandle  handle,
const char *  vectorPath,
int *  nElements 
)

Retrieves the size of an Vector.

Returns the size of semicolon separated elementf in an vector. The node containung the vector has to be tagged via the xml attribute <<mapType="vector">>.

tixi_get_vector_size( integer handle, character*n vectorPath, integer nElements, integer error)

Parameters
[in]handlefile handle as returned by tixiOpenDocument, tixiOpenDocumentRecursive, tixiOpenDocumentFromHTTP, tixiCreateDocument or tixiImportFromString
[in]vectorPathan XPath compliant path to an element holding the vector in the document specified by handle (see section XPath Examples).
[out]nElementsnumber of vector elements
Returns
  • SUCCESS if successfully read the matrix element
  • FAILED internal error
  • INVALID_HANDLE if the handle is not valid
  • INVALID_XPATH if matrixPath is not a well-formed XPath-expression
  • ELEMENT_PATH_NOT_UNIQUE if matrixPath resolves not to a single element but to a list of elements
  • ELEMENT_NOT_FOUND if arrayPath points to a element that is no array

◆ tixiGetVersion()

DLL_EXPORT char* tixiGetVersion ( )

Returns the version number of this TIXI version.

Fortran syntax: tixi_get_version( character version )

Returns
  • char* A string with the version number.

◆ tixiImportElementFromString()

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

◆ tixiImportFromString()

DLL_EXPORT ReturnCode tixiImportFromString ( const char *  xmlImportString,
TixiDocumentHandle handle 
)

Imports a char-string into a new tixi-document.

Creates a new TIXI-document with the content of the string and checks if it is well formed. To validate the document against a XML-Schema or DTD use tixiSchemaValidateFromFile, tixiSchemaValidateFromString or tixiDTDValidate.

Fortran syntax:

tixi_import_from_string( character*n xmlImportString, integer handle, integer error )

Parameters
[in]xmlImportStringthe string with the xml-content
[out]handlehandle to the XML-document. This handle is used in calls to other TIXI functions.
Returns
  • SUCCESS if successfully imported the string
  • NOT_WELL_FORMED if importing of the string succeeds but test for well-formedness fails

◆ tixiOpenDocument()

DLL_EXPORT ReturnCode tixiOpenDocument ( const char *  xmlFilename,
TixiDocumentHandle handle 
)

Open an XML-file for reading.

Opens an XML-file specified by xmlFilename for reading and checks if it is well formed. To validate the document against a XML-Schema or DTD use tixiSchemaValidateFromFile, tixiSchemaValidateFromString or tixiDTDValidate.

Fortran syntax:

tixi_open_document( character*n xml_filename, integer handle, integer error )

Parameters
[in]xmlFilenamename of the XML-file to be opened
[out]handlehandle to the XML-document. This handle is used in calls to other TIXI functions.
Returns
  • SUCCESS if successfully opened the XML-file
  • NOT_WELL_FORMED if opening the XML-file succeeds but test for well-formedness fails
  • OPEN_FAILED if opening of the XML-file failed

◆ tixiOpenDocumentFromHTTP()

DLL_EXPORT ReturnCode tixiOpenDocumentFromHTTP ( const char *  httpURL,
TixiDocumentHandle handle 
)

Open an XML-file for reading from a http web resource.

Opens an XML-file specified by httpURL for reading and checks if it is well formed. To validate the document against a XML-Schema or DTD use tixiSchemaValidateFromFile, tixiSchemaValidateFromString or tixiDTDValidate.

Fortran syntax:

tixi_open_document_from_http( character*n xml_httpurl, integer handle, integer error )

Parameters
[in]httpURLurl of the XML-file to be opened
[out]handlehandle to the XML-document. This handle is used in calls to other TIXI functions.
Returns
  • SUCCESS if successfully opened the XML-file
  • NOT_WELL_FORMED if opening the XML-file succeeds but test for well-formedness fails
  • OPEN_FAILED if opening of the XML-file failed

◆ tixiOpenDocumentRecursive()

DLL_EXPORT ReturnCode tixiOpenDocumentRecursive ( const char *  xmlFilename,
TixiDocumentHandle handle,
OpenMode  oMode 
)

Open an XML-file for reading. It acts like tixiOpenDocument.

If OpenMode is OPENMODE_PLAIN, only the given xml is opened. If OpenMode is OPENMODE_RECURSIVE, external xml files will be integrated into the xml tree by linking them into the main xml file. The user now has only one big xml file. In the path node has be be a valid URI. This uri could adress a relativ or absolut file path, or a http url. Example values for the path node are:

  • absolute local directory: "file:///tmp/" or "file:///c:/windws/"
  • relative local directory: "file://relativeDirectory/" or "file://../anotherRelativeDirectory/"
  • remote http ressource: "http://www.someurl.de/"

Examples for the externaldata node:

<wings>
<airfoils>
<externaldata>
<path>file://aDirectory/</path>
<filename>VFW614-W-1.xml</filename>
<filename>VFW614-W-2.xml</filename>
...
</externaldata>
<airfoil>
<name>VFW614 Seitenleitwerksprofil</name>
<coordinates>
<point><x>1.0000000</x><y>0.0000000</y><z>0.0000000</z></point>
<point><x>0.9795687</x><y>0.0023701</y><z>0.0000000</z></point>
...
</coordinates>
</airfoil>
</airfoils>
</wings>

Fortran syntax:

tixi_open_document_recursive( character*n xml_filename, integer handle, integer openmode, integer error )

Parameters
[in]xmlFilenamename of the XML-file to be opened
[out]handlehandle to the XML-document. This handle is used in calls to other TIXI functions.
[in]oModeEnum of the mode to open (OPENMODE_PLAIN / OPENMODE_RECURSIVE).
Returns
  • SUCCESS if successfully opened the XML-file
  • NOT_WELL_FORMED if opening the XML-file succeeds but test for well-formedness fails
  • OPEN_FAILED if opening of the XML-file failed

◆ tixiRegisterNamespace()

DLL_EXPORT ReturnCode tixiRegisterNamespace ( const TixiDocumentHandle  handle,
const char *  namespaceURI,
const char *  prefix 
)

Registers the given namespace and its prefix.

When dealing with xml namespaces, elements can only be accessed via xPath when their namespace was registered with a prefix.

To automatically register all namespaces and prefixes in the current document, use tixiRegisterNamespacesFromDocument.

Fortran syntax:

tixi_register_namespace( integer handle, character*n namespace_uri, character*n prefix, integer error )

Parameters
[in]handlehandle as returned by tixiCreateDocument, tixiOpenDocumentRecursive or tixiOpenDocumentFromHTTP
[in]namespaceURIThe URI for the namespace (e.g. "http://www.w3.org/TR/html4/")
[in]prefixThe desired prefix of the namespace (e.g. "html")
Returns
  • SUCCESS if the namespace could be registered successfully
  • INVALID_HANDLE if the handle is not valid, i.e. does not or no longer exist
  • FAILED In case of an error

◆ tixiRegisterNamespacesFromDocument()

DLL_EXPORT ReturnCode tixiRegisterNamespacesFromDocument ( const TixiDocumentHandle  handle)

Registers all prefixed namespaces of the xml document to the parser.

Default (non-prefixed) namespaces must be still registered using tixiRegisterNamespace manually to be accessible via xPath.

In the example above, the namespace "http://www.w3.org/TR/html4/" would be registered with the prefix "h" and a query to "/root/h:table" becomes successful.

Fortran syntax:

tixi_register_namespaces_from_document( integer handle, integer error )

Parameters
[in]handlehandle as returned by tixiCreateDocument, tixiOpenDocumentRecursive or tixiOpenDocumentFromHTTP
Returns
  • SUCCESS if the namespace could be registered successfully
  • INVALID_HANDLE if the handle is not valid, i.e. does not or no longer exist
  • FAILED In case of an error.

◆ tixiRemoveAttribute()

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 )

Parameters
[in]handlefile handle as returned by tixiOpenDocument or tixiCreateDocument
[in]elementPathan XPath compliant path to an element in the document specified by handle (see section XPath Examples above).
[in]attributeNamename of the attribute to be added to the element
Returns
  • SUCCESS if successfully removed the attribute
  • 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
  • ATTRIBUTE_NOT_FOUND, if the attribute could not be removed (i.e. if it does not exist)
  • INVALID_NAMESPACE_PREFIX, if the prefix in attributeName is invalid.

◆ tixiRemoveElement()

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

◆ tixiRemoveExternalLinks()

DLL_EXPORT ReturnCode tixiRemoveExternalLinks ( TixiDocumentHandle  handle)

Removes all link attributes to external files.

This does not remove embedded nodes but the references to the filename etc. if TiXI could successfully embed the external files into the main document before. This is e.g. required, if the XML file should be validated against a schema. The external data attributes make validation impossible. To enable validation, this functions removes those extra attributes.

Note: because links to external files are removed, the document cannot be stored anymore split to multiple files.

Assume a main.xml file

<?xml version="1.0" encoding="utf-8"?>
<plane>
<name>Junkers JU 52</name>
<externaldata>
<path>file://</path>
<filename>extdata.xml</filename>
</externaldata>
<aPoint>
...
</aPoint>
</plane>

which links to an external file extdata.xml

<?xml version="1.0" encoding="utf-8"?>
<testNode>
<aVeryTest>
<point>
<x>22</x>
<y>12.2</y>
<z>31.3453</z>
</point>
</aVeryTest>
</testNode>

Internally, this external file is embedded into the xml structure after loading the document. Additionally, some metadata attributes are stored into the external nodes to support saving back into the external files. Therefore, when exporting the document to string or saving the complete document into one file the following xml structure is the result:

<?xml version="1.0" encoding="utf-8"?>
<plane>
<name>Junkers JU 52</name>
<testNode externalFileName="extdata.xml" externalDataDirectory="file://" externalDataNodePath="/plane">
<aVeryTest>
<point>
<x>22</x>
<y>12.2</y>
<z>31.3453</z>
</point>
</aVeryTest>
</testNode>
<aPoint>
...
</aPoint>
</plane>

The tixi function tixiRemoveExternalLinks simply removes the attributes "externalFileName", "externalDataDirectory", and "externalDataNodePath"

<?xml version="1.0" encoding="utf-8"?>
<plane>
<name>Junkers JU 52</name>
<testNode>
<aVeryTest>
<point>
<x>22</x>
<y>12.2</y>
<z>31.3453</z>
</point>
</aVeryTest>
</testNode>
<aPoint>
...
</aPoint>
</plane>

Fortran syntax:

tixi_remove_external_links( integer handle, integer error )

Parameters
[in]handleas returned by tixiCreateDocument
Returns
  • SUCCESS if the external links have been removed successfully
  • INVALID_HANDLE if the handle is not valid

◆ tixiRenameElement()

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

◆ tixiSaveAndRemoveDocument()

DLL_EXPORT ReturnCode tixiSaveAndRemoveDocument ( TixiDocumentHandle  handle,
const char *  xmlFilename 
)

Write XML-document with all external data to disk.

The document is written into a file specified by xmlFilename. The user should validate the document before it is written to disk. Memory allocated internally for processing this document has to be released by tixiCloseDocument.

If the file was opened with OpenMode=OPENMODE_RECURSIVE and external file where linked into the main XML document, these additional nodes will be saved in the xml file as well. The external nodes will be removed from the main xml-document.

Fortran syntax:

tixi_save_and_remove_document( integer handle, character*n xml_filename, integer error )

Parameters
[in]handledocument handle as returned by tixiOpenDocument, tixiOpenDocumentRecursive, tixiOpenDocumentFromHTTP, tixiCreateDocument or tixiImportFromString
[in]xmlFilenamename of the file to be created.
Returns
  • SUCCESS if the file is successfully written and validated
  • INVALID_HANDLE if handle not found in list of man
  • FAILED if writing and closing the XML-file failed

◆ tixiSaveCompleteDocument()

DLL_EXPORT ReturnCode tixiSaveCompleteDocument ( TixiDocumentHandle  handle,
const char *  xmlFilename 
)

Write XML-document with all external data to disk.

The document is written into a file specified by xmlFilename. The user should validate the document before it is written to disk. Memory allocated internally for processing this document has to be released by tixiCloseDocument.

If the file was opened with OpenMode=OPENMODE_RECURSIVE and external file where linked into the main XML document, these additional nodes will be saved in the xml file as well. The external nodes will not be removed from the main xml-document.

Fortran syntax:

tixi_save_complete_document( integer handle, character*n xml_filename, integer error )

Parameters
[in]handledocument handle as returned by tixiOpenDocument, tixiOpenDocumentRecursive, tixiOpenDocumentFromHTTP, tixiCreateDocument or tixiImportFromString
[in]xmlFilenamename of the file to be created.
Returns
  • SUCCESS if the file is successfully written and validated
  • INVALID_HANDLE if handle not found in list of man
  • FAILED if writing and closing the XML-file failed

◆ tixiSaveDocument()

DLL_EXPORT ReturnCode tixiSaveDocument ( TixiDocumentHandle  handle,
const char *  xmlFilename 
)

Write XML-document to disk.

The document is written into a file specified by xmlFilename. The user should validate the document before it is written to disk. Memory allocated internally for processing this document has to be released by tixiCloseDocument.

If the file was opened with OpenMode=OPENMODE_RECURSIVE and external file where linked into the main XML tree, please note that these files are saved back into the external files. The external nodes will not be removed from the main xml-document.

Fortran syntax:

tixi_save_document( integer handle, character*n xml_filename, integer error )

Parameters
[in]handledocument handle as returned by tixiOpenDocument, tixiOpenDocumentRecursive, tixiOpenDocumentFromHTTP, tixiCreateDocument or tixiImportFromString
[in]xmlFilenamename of the file to be created.
Returns
  • SUCCESS if the file is successfully written and validated
  • INVALID_HANDLE if handle not found in list of man
  • FAILED if writing and closing the XML-file failed

◆ tixiSchemaValidateFromFile()

DLL_EXPORT ReturnCode tixiSchemaValidateFromFile ( const TixiDocumentHandle  handle,
const char *  xsdFilename 
)

Validate XML-document against an XML-schema.

Validates an XML-document against an XML-schema specified by xsdFilename. This routine should be called after opening a document by tixiOpenDocument and before tixiSaveDocument if the validation against an XML-schema is desired for the input file and the output file, respectively.

Fortran syntax:

tixi_schema_validate_from_file( integer handle, character*n xsd_filename, integer error )

Parameters
[in]xsdFilenamename of the XML-schema-file to be used.
[in]handlehandle to the XML-document.
Returns
  • SUCCESS if the document is successfully validated
  • NOT_WELL_FORMED if the XML-document is not well formed
  • NOT_SCHEMA_COMPLIANT if the XML-document is well-formed but validating against the given XML-schema fails
  • OPEN_SCHEMA_FAILED if opening of the XML-schema-file failed
  • FAILED for all internal errors

◆ tixiSchemaValidateFromString()

DLL_EXPORT ReturnCode tixiSchemaValidateFromString ( const TixiDocumentHandle  handle,
const char *  xsdString 
)

Validate XML-document against an XML-schema.

Validates an XML-document against an XML-schema specified by xsdString. This routine should be called after opening a document by tixiOpenDocument and before tixiSaveDocument if the validation against an XML-schema is desired for the input file and the output file, respectively. The complete schema has to be in the string xsdString before running this function.

Fortran syntax:

tixi_schema_validate_from_string( integer handle, character*n xsd_string, integer error )

Parameters
[in]xsdStringchar array witch is holding a schema.
[in]handlehandle to the XML-document.
Returns
  • SUCCESS if the document is successfully validated
  • NOT_WELL_FORMED if the XML-document is not well formed
  • NOT_SCHEMA_COMPLIANT if the XML-document is well-formed but validating against the given XML-schema fails
  • OPEN_SCHEMA_FAILED if opening of the XML-schema-file failed
  • FAILED for all internal errors

◆ tixiSchemaValidateWithDefaultsFromFile()

DLL_EXPORT ReturnCode tixiSchemaValidateWithDefaultsFromFile ( const TixiDocumentHandle  handle,
const char *  xsdFilename 
)

Validate XML-document against an XML-schema and insert missing default elements and attributes.

Validates an XML-document against an XML-schema specified by xsdFilename. This routine should be called after opening a document by tixiOpenDocument and before tixiSaveDocument if the validation against an XML-schema is desired for the input file and the output file, respectively. If the schema contains default values, these are added to the XML-document (which is not the case for tixiSchemaValidateFromFile).

Fortran syntax:

tixi_schema_validate_with_defaults_from_file( integer handle, character*n xsd_filename, integer error )

Parameters
[in]xsdFilenamename of the XML-schema-file to be used.
[in]handlehandle to the XML-document.
Returns
  • SUCCESS if the document is successfully validated
  • NOT_WELL_FORMED if the XML-document is not well formed
  • NOT_SCHEMA_COMPLIANT if the XML-document is well-formed but validating against the given XML-schema fails
  • OPEN_SCHEMA_FAILED if opening of the XML-schema-file failed
  • FAILED for all internal errors

◆ tixiSetCacheEnabled()

DLL_EXPORT ReturnCode tixiSetCacheEnabled ( TixiDocumentHandle  handle,
int  enabled 
)

Enables the internal xPath cache.

This speeds up xpath queries with repeating same xpathes.

Parameters
[in]handleThe document handle of a tixi document.
[in]enabledBoolean, whether to enable the cache or not.
Returns
  • SUCCESS if the cache could be enabled/disabled
  • INVALID_HANDLE if the handle is not valid, i.e. does not or no longer exist
  • FAILED otherwise

◆ tixiSetElementNamespace()

DLL_EXPORT ReturnCode tixiSetElementNamespace ( const TixiDocumentHandle  handle,
const char *  elementPath,
const char *  namespaceURI,
const char *  prefix 
)

This function sets the namespace for the specified element.

This function can be used, after an element was created or read from file to set the namespace of the element. To set a default namespace for this element, add NULL as the prefix.

Fortran syntax:

tixi_set_element_namespace( integer handle, character*n element_path, character*n namespace_uri, character*n prefix, integer error )

Returns
  • SUCCESS if the namespace could be set successfully
  • INVALID_HANDLE if the handle is not valid, i.e. does not or no longer exist
  • INVALID_NAMESPACE_URI if the namespace URI is invalid
  • ELEMENT_NOT_FOUND if the element at elementPath does not exist
  • INVALID_XPATH if elementPath is not a well-formed XPath-expression
  • ELEMENT_PATH_NOT_UNIQUE if elementPath resolves not to a single element but to a list of elements
  • FAILED If the namespace could not be set due to another error.

◆ tixiSetPrintMsgFunc()

DLL_EXPORT ReturnCode tixiSetPrintMsgFunc ( TixiPrintMsgFnc  func)

Reroutes all messages of tixi to the message function func.

This can be used, to rerout all tixi messages to a log file, to modify the messages, to parse them etc...

Example to keep tixi silent:

// define the message sink
void tixiSilentMessage(MessageType , const char *, ...){}
// set the message sink
tixiSetPrintMsgFunc(tixiSilentMessage);
Parameters
[in]funcThe new message receiver function
Returns
  • SUCCESS if func is valid
  • FAILED if func is a null pointer

◆ tixiSwapElements()

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

◆ tixiUIDCheckDuplicates()

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

◆ tixiUIDCheckExists()

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

◆ tixiUIDCheckLinks()

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.

◆ tixiUIDGetXPath()

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

◆ tixiUIDSetToXPath()

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

◆ tixiUpdateBooleanElement()

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

◆ tixiUpdateDoubleElement()

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

◆ tixiUpdateFloatVector()

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

◆ tixiUpdateIntegerElement()

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

◆ tixiUpdateTextElement()

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

◆ tixiUsePrettyPrint()

DLL_EXPORT ReturnCode tixiUsePrettyPrint ( TixiDocumentHandle  handle,
int  usePrettyPrint 
)

Sets Pretty print on or off.

Set pretty print on or off. This is used when saing a document to a file, or when exporting to a string. 0 turns pretty print off, 1 turns pretty print on. By default, pretty print is turned on.h

Fortran syntax:

tixi_use_pretty_print( integer handle, integer use_pretty_print, integer error )

Parameters
[in]handlehandle as returned by tixiOpenDocument
[in]usePrettyPrintflag if output should be pretty printed
Returns
  • SUCCESS if a count is computed
  • INVALID_HANDLE if the handle is not valid, i.e. does not or no longer exist
  • FAILED for internal errors or if usePrettyPrint had wrong value

◆ tixiXPathEvaluateNodeNumber()

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 )

Parameters
[in]handlehandle as returned by tixiOpenDocument, tixiOpenDocumentRecursive, tixiOpenDocumentFromHTTP, tixiCreateDocument or tixiImportFromString
[in]xPathExpressionThe XPath Expression to evaluate.
[out]numberThe number of nodes matching this xpath expression.
Returns
  • SUCCESS if successfully retrieved the number of the xPath search.
  • FAILED if an internal error occured.

◆ tixiXPathExpressionGetTextByIndex()

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 )

Parameters
[in]handlehandle as returned by tixiOpenDocument, tixiOpenDocumentRecursive, tixiOpenDocumentFromHTTP, tixiCreateDocument or tixiImportFromString
[in]xPathExpressionThe XPath Expression to evaluate.
[in]elementNumberThe (index)-number to get. Needed if the XPath expression catches more than one node. Index must be between 1 and 'tixiXPathEvaluateNodeNumber()', inclusively.
[out]textthe text content of the node-value. Works for xml-elements and attributes. NULL if an error occured.
Returns
  • SUCCESS if successfully retrieve the text content of a single element.
  • INVALID_XPATH If something goes wrong on evaluating the xpath expression.
  • FAILED is an internal error occured.

◆ tixiXPathExpressionGetXPath()

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.

Parameters
[in]handlehandle as returned by tixiOpenDocument, tixiOpenDocumentRecursive, tixiOpenDocumentFromHTTP, tixiCreateDocument or tixiImportFromString
[in]xPathExpressionThe XPath Expression to evaluate.
[in]indexThe index of the result to query, with 1 <= index <= number, and number queried with tixiXPathEvaluateNodeNumber
[out]xPathThe xPath of the search result.
Returns
  • SUCCESS if successfully retrieve the xPath of the search.
  • INVALID_HANDLE if the handle is not valid, i.e. does not or no longer exist.
  • FAILED if an internal error occured.

◆ tixiXSLTransformationToFile()

DLL_EXPORT ReturnCode tixiXSLTransformationToFile ( TixiDocumentHandle  handle,
const char *  xslFilename,
const char *  resultFilename 
)

Performs a XML transformation and saves the result to resultFilename.

Fortran syntax:

tixi_xsl_transformation_to_file( integer handle, character*n xslFilename, character*n resultFilename, integer error )

Parameters
[in]handlehandle as returned by tixiOpenDocument, tixiOpenDocumentRecursive, tixiOpenDocumentFromHTTP, tixiCreateDocument or tixiImportFromString
[in]xslFilenameThe name of a local file with XSL mapping informations.
[in]resultFilenameThe name of a local file to store the resulting XML document in.
Returns
  • SUCCESS if successful
  • FAILED is something went wrong, i.e. opening of files

◆ tixiXSLTransformationToString()

DLL_EXPORT ReturnCode tixiXSLTransformationToString ( TixiDocumentHandle  handle,
const char *  xslFilename,
char **  resultText 
)

Performs a XML transformation .

Fortran syntax:

tixi_xsl_transformation_to_string( integer handle, character*n xslFilename, character*n resultFilename, integer error )

Parameters
[in]handlehandle as returned by tixiOpenDocument, tixiOpenDocumentRecursive, tixiOpenDocumentFromHTTP, tixiCreateDocument or tixiImportFromString
[in]xslFilenameThe name of a local file with XSL mapping informations.
[out]resultTextThe resulting document of the transformation.
Returns
  • SUCCESS if successful
  • FAILED is something went wrong, i.e. opening of files
MessageType
MessageType
Definition: tixi.h:415
tixiSetPrintMsgFunc
DLL_EXPORT ReturnCode tixiSetPrintMsgFunc(TixiPrintMsgFnc func)
Reroutes all messages of tixi to the message function func.

Generated Tue Mar 8 2022 15:09:00, by Martin Siggel DLR