TiXI  3.3.0
tixi.h
Go to the documentation of this file.
1 /*
2 * Copyright (C) 2015 German Aerospace Center (DLR/SC)
3 *
4 * Created: 2010-08-13 Markus Litz <Markus.Litz@dlr.de>
5 *
6 * Licensed under the Apache License, Version 2.0 (the "License");
7 * you may not use this file except in compliance with the License.
8 * You may obtain a copy of the License at
9 *
10 * http://www.apache.org/licenses/LICENSE-2.0
11 *
12 * Unless required by applicable law or agreed to in writing, software
13 * distributed under the License is distributed on an "AS IS" BASIS,
14 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
15 * See the License for the specific language governing permissions and
16 * limitations under the License.
17 */
18 #ifdef __cplusplus
19 extern "C" {
20 #endif
21 
22 #if defined(WIN32)
23 #if defined (tixi3_EXPORTS)
24 #define DLL_EXPORT __declspec (dllexport)
25 #else
26 #define DLL_EXPORT
27 #endif
28 #else
29 #define DLL_EXPORT
30 #endif
31 
32 // DEPRECATION MACRO
33 #if defined(_MSC_VER)
34 #define DEPRECATED __declspec(deprecated)
35 #elif defined(__GNUC__)
36 #define DEPRECATED __attribute__((deprecated))
37 #else
38 #pragma message("WARNING: You need to implement DEPRECATED for this compiler")
39 #define DEPRECATED
40 #endif
41 
42 /* \mainpage TIXI Manual
43 <b>Contents:</b>
44  - \link Glossary Glossary\endlink
45  - \link XPathExamples XPath Examples\endlink
46  - \link UsageExamples Usage\endlink
47  - <a HREF="modules.html" class="el">Function Documentation</a>
48  */
49 /*
50  @file tixi.h
51  @author Hans-Peter Kersken <Hans-Peter.Kersken@dlr.de>
52  Markus Litz <Markus.Litz@dlr.de>,
53  Markus Kunde <Markus.Kunde@dlr.de>,
54  Arne Bachmann <Arne.Bachmann@dlr.de>,
55  @date Tue Feb 02 14:28:05 2009
56 
57  @brief Definition of <b>TIXI</b> the <b>TI</b>VA - <b>XML</b> - <b>I</b>nterface
58 */
240 #ifndef TIXI_H
241 #define TIXI_H
242 
246 typedef int TixiDocumentHandle;
247 
248 
259 {
346 };
347 
348 typedef enum ReturnCode ReturnCode;
349 
362 {
365 };
366 
367 
369 
370 
383 {
386 };
387 
388 
389 typedef enum OpenMode OpenMode;
398 {
401 };
402 
403 
405 
406 
416 {
420 };
421 
422 
424 
434 typedef void (*TixiPrintMsgFnc) (MessageType type, const char *msg);
435 
445 DLL_EXPORT char* tixiGetVersion();
446 
447 
448 
477 DLL_EXPORT ReturnCode tixiOpenDocument (const char *xmlFilename, TixiDocumentHandle * handle);
478 
479 
480 
530 DLL_EXPORT ReturnCode tixiOpenDocumentRecursive (const char *xmlFilename, TixiDocumentHandle * handle, OpenMode oMode);
531 
532 
555 DLL_EXPORT ReturnCode tixiOpenDocumentFromHTTP (const char *httpURL, TixiDocumentHandle * handle);
556 
575 DLL_EXPORT ReturnCode tixiCreateDocument (const char *rootElementName, TixiDocumentHandle * handle);
576 
591 DLL_EXPORT ReturnCode tixiGetDocumentPath (TixiDocumentHandle handle, char** documentPath);
592 
618 DLL_EXPORT ReturnCode tixiSaveDocument (TixiDocumentHandle handle, const char *xmlFilename);
619 
620 
647 DLL_EXPORT ReturnCode tixiSaveCompleteDocument (TixiDocumentHandle handle, const char *xmlFilename);
648 
649 
675 DLL_EXPORT ReturnCode tixiSaveAndRemoveDocument (TixiDocumentHandle handle, const char *xmlFilename);
676 
677 
698 DLL_EXPORT ReturnCode tixiCloseDocument (TixiDocumentHandle handle);
699 
700 
717 DLL_EXPORT ReturnCode tixiCloseAllDocuments ();
718 
722 DLL_EXPORT ReturnCode tixiCleanup ();
723 
724 
747 DLL_EXPORT ReturnCode tixiExportDocumentAsString (const TixiDocumentHandle handle, char **text);
748 
749 
769 DLL_EXPORT ReturnCode tixiImportFromString (const char *xmlImportString, TixiDocumentHandle * handle);
770 
778 
779 
805 DLL_EXPORT ReturnCode tixiSchemaValidateFromFile (const TixiDocumentHandle handle, const char *xsdFilename);
806 
834 DLL_EXPORT ReturnCode tixiSchemaValidateWithDefaultsFromFile (const TixiDocumentHandle handle, const char *xsdFilename);
835 
863 DLL_EXPORT ReturnCode tixiSchemaValidateFromString (const TixiDocumentHandle handle, const char *xsdString);
864 
865 
890 DLL_EXPORT ReturnCode tixiDTDValidate (const TixiDocumentHandle handle, const char *DTDFilename);
931 DLL_EXPORT ReturnCode tixiGetTextElement (const TixiDocumentHandle handle,
932  const char *elementPath, char **text);
933 
934 
963 DLL_EXPORT ReturnCode tixiGetIntegerElement (const TixiDocumentHandle handle, const char *elementPath, int *number);
964 
992 DLL_EXPORT ReturnCode tixiGetDoubleElement (const TixiDocumentHandle handle, const char *elementPath, double *number);
993 
994 
1025 DLL_EXPORT ReturnCode tixiGetBooleanElement (const TixiDocumentHandle handle, const char *elementPath, int *boolean);
1026 
1027 
1055 DLL_EXPORT ReturnCode tixiUpdateTextElement (const TixiDocumentHandle handle, const char *elementPath, const char *text);
1056 
1057 
1088 DLL_EXPORT ReturnCode tixiUpdateDoubleElement (const TixiDocumentHandle handle, const char *elementPath, double number, const char *format);
1089 
1120 DLL_EXPORT ReturnCode tixiUpdateIntegerElement (const TixiDocumentHandle handle, const char *elementPath, int number, const char *format);
1121 
1149 DLL_EXPORT ReturnCode tixiUpdateBooleanElement (const TixiDocumentHandle handle, const char *elementPath, int boolean);
1150 
1151 
1184 DLL_EXPORT ReturnCode tixiAddTextElement (const TixiDocumentHandle handle, const char *parentPath, const char *elementName, const char *text);
1185 
1186 
1227 DLL_EXPORT ReturnCode tixiAddTextElementNS (const TixiDocumentHandle handle, const char *parentPath,
1228  const char *qualifiedName, const char *namespaceURI, const char *text);
1229 
1230 
1231 
1268 DLL_EXPORT ReturnCode tixiAddTextElementAtIndex (const TixiDocumentHandle handle, const char *parentPath, const char *elementName, const char *text, int index);
1269 
1313 DLL_EXPORT ReturnCode tixiAddTextElementNSAtIndex(const TixiDocumentHandle handle, const char *parentPath,
1314  const char* qualifiedName, const char* namespaceURI, const char *text, int index);
1315 
1348 DLL_EXPORT ReturnCode tixiAddBooleanElement (const TixiDocumentHandle handle, const char *parentPath, const char *elementName, int boolean);
1349 
1350 
1391 DLL_EXPORT ReturnCode tixiAddBooleanElementNS (const TixiDocumentHandle handle, const char *parentPath,
1392  const char *qualifiedName, const char* namespaceURI, int boolean);
1393 
1394 
1426 DLL_EXPORT ReturnCode tixiAddDoubleElement (const TixiDocumentHandle handle,
1427  const char *parentPath, const char *elementName,
1428  double number, const char *format);
1429 
1430 
1470 DLL_EXPORT ReturnCode tixiAddDoubleElementNS (const TixiDocumentHandle handle,
1471  const char *parentPath, const char *qualifiedName, const char* namespaceURI,
1472  double number, const char *format);
1473 
1505 DLL_EXPORT ReturnCode tixiAddIntegerElement (const TixiDocumentHandle handle,
1506  const char *parentPath, const char *elementName,
1507  int number, const char *format);
1508 
1509 
1549 DLL_EXPORT ReturnCode tixiAddIntegerElementNS (const TixiDocumentHandle handle,
1550  const char *parentPath,
1551  const char *qualifiedName, const char *namespaceURI,
1552  int number, const char *format);
1553 
1554 
1599 DLL_EXPORT ReturnCode tixiAddFloatVector (const TixiDocumentHandle handle, const char *parentPath, const char *elementName, const double *vector, const int numElements, const char* format);
1600 
1601 
1638 DLL_EXPORT ReturnCode tixiUpdateFloatVector (const TixiDocumentHandle handle, const char *path, const double *vector, const int numElements, const char* format);
1639 
1640 
1669 DLL_EXPORT ReturnCode tixiCreateElement (const TixiDocumentHandle handle, const char *parentPath, const char *elementName);
1670 
1671 
1708 DLL_EXPORT ReturnCode tixiCreateElementNS (const TixiDocumentHandle handle, const char *parentPath,
1709  const char *qualifiedName, const char* namespaceURI);
1710 
1711 
1743 DLL_EXPORT ReturnCode tixiCreateElementAtIndex (const TixiDocumentHandle handle, const char *parentPath, const char *elementName, int index);
1744 
1745 
1785 DLL_EXPORT ReturnCode tixiCreateElementNSAtIndex (const TixiDocumentHandle handle, const char *parentPath,
1786  const char *qualifiedName, int index, const char* namespaceURI);
1787 
1788 
1810 DLL_EXPORT ReturnCode tixiRenameElement(const TixiDocumentHandle handle,
1811  const char* parentPath,
1812  const char* oldName,
1813  const char* newName);
1814 
1838 DLL_EXPORT ReturnCode tixiRemoveElement (const TixiDocumentHandle handle, const char *elementPath);
1839 
1840 
1863 DLL_EXPORT ReturnCode tixiGetNodeType (const TixiDocumentHandle handle,
1864  const char *nodePath, char **nodeType);
1865 
1866 
1891 DLL_EXPORT ReturnCode tixiGetNamedChildrenCount (const TixiDocumentHandle handle,
1892  const char *elementPath, const char *childName,
1893  int *count);
1894 
1919 DLL_EXPORT ReturnCode tixiGetChildNodeName (const TixiDocumentHandle handle,
1920  const char *parentElementPath, int index, char **name);
1921 
1942 DLL_EXPORT ReturnCode tixiGetNumberOfChilds(const TixiDocumentHandle handle, const char *elementPath, int* nChilds);
1943 
1962 DLL_EXPORT ReturnCode tixiSwapElements(const TixiDocumentHandle handle, const char* element1Path, const char* element2Path);
1963 
1964 
1992 DLL_EXPORT ReturnCode tixiExportElementAsString (const TixiDocumentHandle handle, const char* elementPath, char **text);
1993 
1994 
2024 DLL_EXPORT ReturnCode tixiImportElementFromString (const TixiDocumentHandle handle, const char *parentPath, const char *xmlImportString);
2025 
2026 
2037 
2071 DLL_EXPORT ReturnCode tixiGetTextAttribute (const TixiDocumentHandle handle,
2072  const char *elementPath, const char *attributeName,
2073  char **text);
2074 
2108 DLL_EXPORT ReturnCode tixiGetIntegerAttribute (const TixiDocumentHandle handle,
2109  const char *elementPath, const char *attributeName,
2110  int *number);
2111 
2145 DLL_EXPORT ReturnCode tixiGetBooleanAttribute (const TixiDocumentHandle handle,
2146  const char *elementPath, const char *attributeName,
2147  int *boolean);
2148 
2182 DLL_EXPORT ReturnCode tixiGetDoubleAttribute (const TixiDocumentHandle handle,
2183  const char *elementPath, const char *attributeName,
2184  double *number);
2185 
2186 
2187 
2188 
2224 DLL_EXPORT ReturnCode tixiAddTextAttribute (const TixiDocumentHandle handle,
2225  const char *elementPath, const char *attributeName,
2226  const char *attributeValue);
2227 
2228 
2269 DLL_EXPORT ReturnCode tixiAddDoubleAttribute (const TixiDocumentHandle handle,
2270  const char *elementPath, const char *attributeName,
2271  double number, const char *format);
2272 
2273 
2313 DLL_EXPORT ReturnCode tixiAddIntegerAttribute (const TixiDocumentHandle handle,
2314  const char *elementPath, const char *attributeName,
2315  int number, const char *format);
2316 
2345 DLL_EXPORT ReturnCode tixiRemoveAttribute (const TixiDocumentHandle handle,
2346  const char *elementPath, const char *attributeName);
2347 
2348 
2369 DLL_EXPORT ReturnCode tixiGetNumberOfAttributes(const TixiDocumentHandle handle, const char *elementPath, int* nAttributes);
2370 
2371 
2393 DLL_EXPORT ReturnCode tixiGetAttributeName(const TixiDocumentHandle handle, const char *elementPath, int attrIndex, char** attrName);
2394 
2460 
2461 
2484 DLL_EXPORT ReturnCode tixiRegisterNamespace(const TixiDocumentHandle handle, const char* namespaceURI, const char* prefix);
2485 
2486 
2507 DLL_EXPORT ReturnCode tixiRegisterNamespacesFromDocument(const TixiDocumentHandle handle);
2508 
2509 
2530 DLL_EXPORT ReturnCode tixiSetElementNamespace(const TixiDocumentHandle handle, const char* elementPath,
2531  const char* namespaceURI, const char* prefix);
2532 
2533 
2557 DLL_EXPORT ReturnCode tixiDeclareNamespace(const TixiDocumentHandle handle, const char* elementPath,
2558  const char* namespaceURI, const char* prefix);
2559 
2567 
2568 
2600 DLL_EXPORT ReturnCode tixiAddExternalLink (const TixiDocumentHandle handle, const char *parentPath,
2601  const char *pathOrUrl, const char *filename, AddLinkMode mode);
2602 
2603 
2701 DLL_EXPORT ReturnCode tixiRemoveExternalLinks(TixiDocumentHandle handle);
2702 
2726 DLL_EXPORT ReturnCode tixiAddHeader (const TixiDocumentHandle handle, const char *toolName,
2727  const char *version, const char *authorName);
2728 
2729 
2730 
2755 DLL_EXPORT ReturnCode tixiAddCpacsHeader (const TixiDocumentHandle handle, const char *name, const char *creator,
2756  const char *version, const char *description, const char * cpacsVersion);
2757 
2758 
2773 DLL_EXPORT ReturnCode tixiCheckElement (const TixiDocumentHandle handle, const char *elementPath);
2774 
2775 
2789 DLL_EXPORT ReturnCode tixiCheckDocumentHandle (const TixiDocumentHandle handle);
2790 
2811 DLL_EXPORT ReturnCode tixiUsePrettyPrint(TixiDocumentHandle handle, int usePrettyPrint);
2812 
2835 
2843 
2844 
2858 DLL_EXPORT ReturnCode tixiSetCacheEnabled(TixiDocumentHandle handle, int enabled);
2859 
2868 
2908 DLL_EXPORT ReturnCode tixiAddDoubleListWithAttributes (const TixiDocumentHandle handle,
2909  const char *parentPath,
2910  const char *listName, const char *childName,
2911  const char *childAttributeName,
2912  const double *values, const char *format,
2913  const char **attributes, int nValues);
2914 
2936 DLL_EXPORT ReturnCode tixiGetVectorSize (const TixiDocumentHandle handle,
2937  const char *vectorPath, int *nElements);
2938 
2939 
2967 DLL_EXPORT ReturnCode tixiGetFloatVector (const TixiDocumentHandle handle, const char *vectorPath,
2968  double **vectorArray, const int eNumber);
2969 
2970 
3019 DEPRECATED DLL_EXPORT ReturnCode tixiGetArrayDimensions (const TixiDocumentHandle handle,
3020  const char *arrayPath, int *dimensions);
3021 
3022 
3052 DEPRECATED DLL_EXPORT ReturnCode tixiGetArrayDimensionSizes (const TixiDocumentHandle handle, const char *arrayPath,
3053  int *sizes, int *linearArraySize);
3054 
3055 
3084 DEPRECATED DLL_EXPORT ReturnCode tixiGetArrayDimensionNames (const TixiDocumentHandle handle,
3085  const char *arrayPath, char **dimensionNames);
3086 
3087 
3116 DEPRECATED DLL_EXPORT ReturnCode tixiGetArrayDimensionValues (const TixiDocumentHandle handle, const char *arrayPath,
3117  const int dimension, double *dimensionValues);
3118 
3119 
3147 DEPRECATED DLL_EXPORT ReturnCode tixiGetArrayParameters (const TixiDocumentHandle handle,
3148  const char *arrayPath,
3149  int *parameters);
3150 
3151 
3179 DEPRECATED DLL_EXPORT ReturnCode tixiGetArrayParameterNames (const TixiDocumentHandle handle,
3180  const char *arrayPath, char **parameterNames);
3181 
3182 
3217 DEPRECATED DLL_EXPORT ReturnCode tixiGetArray (const TixiDocumentHandle handle, const char *arrayPath,
3218  const char *elementName, int arraySize, double **values);
3219 
3220 
3239 DEPRECATED DLL_EXPORT double tixiGetArrayValue(const double *array,
3240  const int *dimSize,
3241  const int *dimPos,
3242  const int dims);
3243 
3244 
3272 DEPRECATED DLL_EXPORT ReturnCode tixiGetArrayElementCount (const TixiDocumentHandle handle, const char *arrayPath,
3273  const char *elementName, int *elements);
3274 
3275 
3303 DEPRECATED DLL_EXPORT ReturnCode tixiGetArrayElementNames (const TixiDocumentHandle handle, const char *arrayPath,
3304  const char *elementType, char **elementNames);
3305 
3306 
3342 DLL_EXPORT ReturnCode tixiAddPoint (const TixiDocumentHandle handle, const char *pointParentPath,
3343  double x, double y, double z, const char *format);
3344 
3385 DLL_EXPORT ReturnCode tixiGetPoint (const TixiDocumentHandle handle,
3386  const char *pointParentPath,
3387  double *x, double *y, double *z);
3388 
3389 
3390 
3413 DLL_EXPORT ReturnCode tixiCheckAttribute(TixiDocumentHandle handle, const char *elementPath, const char *attributeName);
3414 
3415 
3422 
3438 DLL_EXPORT ReturnCode tixiXSLTransformationToString(TixiDocumentHandle handle, const char *xslFilename, char **resultText);
3439 
3455 DLL_EXPORT ReturnCode tixiXSLTransformationToFile(TixiDocumentHandle handle, const char *xslFilename, const char *resultFilename);
3456 
3457 
3465 
3481 DLL_EXPORT ReturnCode tixiXPathEvaluateNodeNumber(TixiDocumentHandle handle, const char *xPathExpression, int *number);
3482 
3496 DLL_EXPORT ReturnCode tixiXPathExpressionGetXPath(TixiDocumentHandle handle, const char *xPathExpression, int index, char** xPath);
3497 
3521 DLL_EXPORT ReturnCode tixiXPathExpressionGetTextByIndex(TixiDocumentHandle handle, const char *xPathExpression, int elementNumber, char **text);
3522 
3523 
3531 
3546 DLL_EXPORT ReturnCode tixiUIDCheckDuplicates(TixiDocumentHandle handle);
3547 
3548 
3564 DLL_EXPORT ReturnCode tixiUIDCheckLinks(TixiDocumentHandle handle);
3565 
3586 DLL_EXPORT ReturnCode tixiUIDGetXPath(TixiDocumentHandle handle, const char *uID, char **xPath);
3587 
3588 
3605 DLL_EXPORT ReturnCode tixiUIDCheckExists(TixiDocumentHandle handle, const char *uID);
3606 
3607 
3630 DLL_EXPORT ReturnCode tixiUIDSetToXPath(TixiDocumentHandle handle, const char *xPath, const char *uID);
3631 
3632 
3636 #endif /* TIXI_H */
3637 
3638 
3639 #ifdef __cplusplus
3640 }
3641 #endif
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.
DLL_EXPORT ReturnCode tixiCheckAttribute(TixiDocumentHandle handle, const char *elementPath, const char *attributeName)
Checks the existence of an element's attribute.
DLL_EXPORT ReturnCode tixiUIDCheckExists(TixiDocumentHandle handle, const char *uID)
Checks if a uID exists.
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.
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.
DLL_EXPORT ReturnCode tixiDTDValidate(const TixiDocumentHandle handle, const char *DTDFilename)
Validate XML-document against a DTD.
DLL_EXPORT ReturnCode tixiCreateElementAtIndex(const TixiDocumentHandle handle, const char *parentPath, const char *elementName, int index)
Creates an empty element at a given index.
DLL_EXPORT ReturnCode tixiSaveAndRemoveDocument(TixiDocumentHandle handle, const char *xmlFilename)
Write XML-document with all external data to disk.
DLL_EXPORT ReturnCode tixiCheckDocumentHandle(const TixiDocumentHandle handle)
Checks for validity of a document handle.
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".
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.).
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.
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.
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.
DLL_EXPORT ReturnCode tixiCreateElement(const TixiDocumentHandle handle, const char *parentPath, const char *elementName)
Creates an empty element.
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 expre...
DLL_EXPORT ReturnCode tixiExportDocumentAsString(const TixiDocumentHandle handle, char **text)
Returns the Document as one text.
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.
DEPRECATED DLL_EXPORT ReturnCode tixiGetArrayElementCount(const TixiDocumentHandle handle, const char *arrayPath, const char *elementName, int *elements)
Helper function.
DLL_EXPORT ReturnCode tixiGetIntegerElement(const TixiDocumentHandle handle, const char *elementPath, int *number)
Retrieve integer content of an element.
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".
DLL_EXPORT ReturnCode tixiImportFromString(const char *xmlImportString, TixiDocumentHandle *handle)
Imports a char-string into a new tixi-document.
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.
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.
DLL_EXPORT ReturnCode tixiUIDGetXPath(TixiDocumentHandle handle, const char *uID, char **xPath)
Returns the XPath to given uID.
#define DEPRECATED
Definition: tixi.h:39
DLL_EXPORT ReturnCode tixiUsePrettyPrint(TixiDocumentHandle handle, int usePrettyPrint)
Sets Pretty print on or off.
DLL_EXPORT ReturnCode tixiRegisterNamespace(const TixiDocumentHandle handle, const char *namespaceURI, const char *prefix)
Registers the given namespace and its prefix.
DLL_EXPORT ReturnCode tixiGetFloatVector(const TixiDocumentHandle handle, const char *vectorPath, double **vectorArray, const int eNumber)
Retrieves a vector.
DLL_EXPORT ReturnCode tixiGetVectorSize(const TixiDocumentHandle handle, const char *vectorPath, int *nElements)
Retrieves the size of an Vector.
DLL_EXPORT ReturnCode tixiSwapElements(const TixiDocumentHandle handle, const char *element1Path, const char *element2Path)
Swaps to xml elements with each other.
DLL_EXPORT ReturnCode tixiCheckElement(const TixiDocumentHandle handle, const char *elementPath)
Checks if the given element exists.
DLL_EXPORT ReturnCode tixiGetNodeType(const TixiDocumentHandle handle, const char *nodePath, char **nodeType)
Returns the number of child elements beneath a given path.
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.
DEPRECATED DLL_EXPORT ReturnCode tixiGetArrayParameterNames(const TixiDocumentHandle handle, const char *arrayPath, char **parameterNames)
Retrieves names of all parameters.
DLL_EXPORT ReturnCode tixiRemoveElement(const TixiDocumentHandle handle, const char *elementPath)
Removes an element.
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.
DLL_EXPORT ReturnCode tixiAddTextElement(const TixiDocumentHandle handle, const char *parentPath, const char *elementName, const char *text)
Creates an element holding text.
DLL_EXPORT ReturnCode tixiUpdateTextElement(const TixiDocumentHandle handle, const char *elementPath, const char *text)
Updates the text content of an element.
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.
DLL_EXPORT ReturnCode tixiCloseAllDocuments()
Close all open documents.
DLL_EXPORT ReturnCode tixiXSLTransformationToString(TixiDocumentHandle handle, const char *xslFilename, char **resultText)
Performs a XML transformation .
int TixiDocumentHandle
Definition: tixi.h:246
#define DLL_EXPORT
Definition: tixi.h:29
DLL_EXPORT ReturnCode tixiSchemaValidateFromFile(const TixiDocumentHandle handle, const char *xsdFilename)
Validate XML-document against an XML-schema.
DLL_EXPORT ReturnCode tixiOpenDocument(const char *xmlFilename, TixiDocumentHandle *handle)
Open an XML-file for reading.
DEPRECATED DLL_EXPORT ReturnCode tixiGetArrayDimensions(const TixiDocumentHandle handle, const char *arrayPath, int *dimensions)
Retrieves the number of dimensions of an Array.
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.
StorageMode
Definition: tixi.h:361
DLL_EXPORT ReturnCode tixiUIDCheckLinks(TixiDocumentHandle handle)
Performs a check over all nodes with the uID "isLink" and check if the corresponding uid exists in th...
DLL_EXPORT ReturnCode tixiCleanup()
Closes the xml2 library and frees its allocated variables.
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.
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.
DLL_EXPORT ReturnCode tixiGetNumberOfAttributes(const TixiDocumentHandle handle, const char *elementPath, int *nAttributes)
Returns the number of attributes of a given node.
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.
DLL_EXPORT ReturnCode tixiUpdateDoubleElement(const TixiDocumentHandle handle, const char *elementPath, double number, const char *format)
Updates the double content of an element.
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 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...
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.
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.
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.
void(* TixiPrintMsgFnc)(MessageType type, const char *msg)
Definition: tixi.h:434
DLL_EXPORT ReturnCode tixiUIDSetToXPath(TixiDocumentHandle handle, const char *xPath, const char *uID)
Sets a uID attribute to a node, specified via its XPath.
DLL_EXPORT ReturnCode tixiSetPrintMsgFunc(TixiPrintMsgFnc func)
Reroutes all messages of tixi to the message function func.
DLL_EXPORT ReturnCode tixiGetAttributeName(const TixiDocumentHandle handle, const char *elementPath, int attrIndex, char **attrName)
Returns the name of an attribute beneath a given path.
DLL_EXPORT ReturnCode tixiCloseDocument(TixiDocumentHandle handle)
Close an XML-document.
DLL_EXPORT ReturnCode tixiSaveDocument(TixiDocumentHandle handle, const char *xmlFilename)
Write XML-document to disk.
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.
DLL_EXPORT ReturnCode tixiRegisterNamespacesFromDocument(const TixiDocumentHandle handle)
Registers all prefixed namespaces of the xml document to the parser.
DLL_EXPORT ReturnCode tixiCreateDocument(const char *rootElementName, TixiDocumentHandle *handle)
Create an XML-document.
DLL_EXPORT ReturnCode tixiGetDocumentPath(TixiDocumentHandle handle, char **documentPath)
Returns the file path to the document.
DLL_EXPORT ReturnCode tixiSchemaValidateFromString(const TixiDocumentHandle handle, const char *xsdString)
Validate XML-document against an XML-schema.
DLL_EXPORT char * tixiGetVersion()
Returns the version number of this TIXI version.
DLL_EXPORT ReturnCode tixiCreateElementNS(const TixiDocumentHandle handle, const char *parentPath, const char *qualifiedName, const char *namespaceURI)
Creates an empty element in the specified namespace.
DLL_EXPORT ReturnCode tixiOpenDocumentFromHTTP(const char *httpURL, TixiDocumentHandle *handle)
Open an XML-file for reading from a http web resource.
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.
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...
DLL_EXPORT ReturnCode tixiGetTextElement(const TixiDocumentHandle handle, const char *elementPath, char **text)
Retrieve text content of an element.
DLL_EXPORT ReturnCode tixiExportElementAsString(const TixiDocumentHandle handle, const char *elementPath, char **text)
Returns the element as one XML text.
DLL_EXPORT ReturnCode tixiUpdateBooleanElement(const TixiDocumentHandle handle, const char *elementPath, int boolean)
Updates the boolean content of an element.
DLL_EXPORT ReturnCode tixiGetDoubleElement(const TixiDocumentHandle handle, const char *elementPath, double *number)
Retrieve floating point content of an element.
DLL_EXPORT ReturnCode tixiSetCacheEnabled(TixiDocumentHandle handle, int enabled)
Enables the internal xPath cache.
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.
DEPRECATED DLL_EXPORT ReturnCode tixiGetArrayDimensionNames(const TixiDocumentHandle handle, const char *arrayPath, char **dimensionNames)
Retrieves the names of all dimensions.
DLL_EXPORT ReturnCode tixiUIDCheckDuplicates(TixiDocumentHandle handle)
Performs a check over all UIDs and checks for duplicates.
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.
DLL_EXPORT ReturnCode tixiRemoveExternalLinks(TixiDocumentHandle handle)
Removes all link attributes to external files.
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.
DLL_EXPORT ReturnCode tixiGetNumberOfChilds(const TixiDocumentHandle handle, const char *elementPath, int *nChilds)
Returns the number of child elements beneath a given path.
ReturnCode
Definition: tixi.h:258
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.
DLL_EXPORT ReturnCode tixiAddHeader(const TixiDocumentHandle handle, const char *toolName, const char *version, const char *authorName)
Add header to XML-file.
DEPRECATED DLL_EXPORT ReturnCode tixiGetArrayParameters(const TixiDocumentHandle handle, const char *arrayPath, int *parameters)
Retrieves the number of parameters of an array.
OpenMode
Definition: tixi.h:382
DLL_EXPORT ReturnCode tixiOpenDocumentRecursive(const char *xmlFilename, TixiDocumentHandle *handle, OpenMode oMode)
Open an XML-file for reading. It acts like tixiOpenDocument.
Definition: tixi.h:363
DLL_EXPORT ReturnCode tixiSchemaValidateWithDefaultsFromFile(const TixiDocumentHandle handle, const char *xsdFilename)
Validate XML-document against an XML-schema and insert missing default elements and attributes...
DLL_EXPORT TixiPrintMsgFnc tixiGetPrintMsgFunc()
Returns the currently registered message handler function.
DLL_EXPORT ReturnCode tixiRemoveAttribute(const TixiDocumentHandle handle, const char *elementPath, const char *attributeName)
Removes an attribute.
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.
Definition: tixi.h:260
DLL_EXPORT ReturnCode tixiSaveCompleteDocument(TixiDocumentHandle handle, const char *xmlFilename)
Write XML-document with all external data to disk.
DLL_EXPORT ReturnCode tixiGetBooleanElement(const TixiDocumentHandle handle, const char *elementPath, int *boolean)
Retrieve boolean content of an element.
DLL_EXPORT ReturnCode tixiXSLTransformationToFile(TixiDocumentHandle handle, const char *xslFilename, const char *resultFilename)
Performs a XML transformation and saves the result to resultFilename.
Definition: tixi.h:262
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.
MessageType
Definition: tixi.h:415
DEPRECATED DLL_EXPORT ReturnCode tixiGetArrayElementNames(const TixiDocumentHandle handle, const char *arrayPath, const char *elementType, char **elementNames)
Helper function.
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.
DLL_EXPORT ReturnCode tixiUpdateIntegerElement(const TixiDocumentHandle handle, const char *elementPath, int number, const char *format)
Updates the double content of an element.
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.
DLL_EXPORT ReturnCode tixiRenameElement(const TixiDocumentHandle handle, const char *parentPath, const char *oldName, const char *newName)
Renames an element.
AddLinkMode
Definition: tixi.h:397

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