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

#define DEPRECATED

Definition at line 39 of file tixi.h.

#define DLL_EXPORT

Definition at line 29 of file tixi.h.

#define TIXI_H

Definition at line 241 of file tixi.h.

Typedef Documentation

typedef enum AddLinkMode AddLinkMode

Definition at line 404 of file tixi.h.

typedef enum MessageType MessageType

Definition at line 423 of file tixi.h.

typedef enum OpenMode OpenMode

Definition at line 389 of file tixi.h.

typedef enum ReturnCode ReturnCode

Definition at line 348 of file tixi.h.

typedef enum StorageMode StorageMode

Definition at line 368 of file tixi.h.

typedef int TixiDocumentHandle

Datatype for TixiDocumentHandle.

Definition at line 246 of file tixi.h.

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

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.

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