TiXI  3.0.3
 All Files Functions Typedefs Enumerations Enumerator Macros Groups Pages
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 /* \mainpage TIXI Manual
33 <b>Contents:</b>
34  - \link Glossary Glossary\endlink
35  - \link XPathExamples XPath Examples\endlink
36  - \link UsageExamples Usage\endlink
37  - <a HREF="modules.html" class="el">Function Documentation</a>
38  */
39 /*
40  @file tixi.h
41  @author Hans-Peter Kersken <Hans-Peter.Kersken@dlr.de>
42  Markus Litz <Markus.Litz@dlr.de>,
43  Markus Kunde <Markus.Kunde@dlr.de>,
44  Arne Bachmann <Arne.Bachmann@dlr.de>,
45  @date Tue Feb 02 14:28:05 2009
46 
47  @brief Definition of <b>TIXI</b> the <b>TI</b>VA - <b>XML</b> - <b>I</b>nterface
48 */
230 #ifndef TIXI_H
231 #define TIXI_H
232 
236 typedef int TixiDocumentHandle;
237 
238 
249 {
336 };
337 
338 typedef enum ReturnCode ReturnCode;
339 
352 {
355 };
356 
357 
359 
360 
373 {
376 };
377 
378 
379 typedef enum OpenMode OpenMode;
380 
390 {
394 };
395 
396 
398 
408 typedef void (*TixiPrintMsgFnc) (MessageType type, const char *msg);
409 
419 DLL_EXPORT char* tixiGetVersion();
420 
421 
422 
451 DLL_EXPORT ReturnCode tixiOpenDocument (const char *xmlFilename, TixiDocumentHandle * handle);
452 
453 
454 
504 DLL_EXPORT ReturnCode tixiOpenDocumentRecursive (const char *xmlFilename, TixiDocumentHandle * handle, OpenMode oMode);
505 
506 
529 DLL_EXPORT ReturnCode tixiOpenDocumentFromHTTP (const char *httpURL, TixiDocumentHandle * handle);
530 
549 DLL_EXPORT ReturnCode tixiCreateDocument (const char *rootElementName, TixiDocumentHandle * handle);
550 
565 DLL_EXPORT ReturnCode tixiGetDocumentPath (TixiDocumentHandle handle, char** documentPath);
566 
592 DLL_EXPORT ReturnCode tixiSaveDocument (TixiDocumentHandle handle, const char *xmlFilename);
593 
594 
621 DLL_EXPORT ReturnCode tixiSaveCompleteDocument (TixiDocumentHandle handle, const char *xmlFilename);
622 
623 
649 DLL_EXPORT ReturnCode tixiSaveAndRemoveDocument (TixiDocumentHandle handle, const char *xmlFilename);
650 
651 
672 DLL_EXPORT ReturnCode tixiCloseDocument (TixiDocumentHandle handle);
673 
674 
691 DLL_EXPORT ReturnCode tixiCloseAllDocuments ();
692 
696 DLL_EXPORT ReturnCode tixiCleanup ();
697 
698 
721 DLL_EXPORT ReturnCode tixiExportDocumentAsString (const TixiDocumentHandle handle, char **text);
722 
723 
743 DLL_EXPORT ReturnCode tixiImportFromString (const char *xmlImportString, TixiDocumentHandle * handle);
744 
752 
753 
779 DLL_EXPORT ReturnCode tixiSchemaValidateFromFile (const TixiDocumentHandle handle, const char *xsdFilename);
780 
808 DLL_EXPORT ReturnCode tixiSchemaValidateWithDefaultsFromFile (const TixiDocumentHandle handle, const char *xsdFilename);
809 
837 DLL_EXPORT ReturnCode tixiSchemaValidateFromString (const TixiDocumentHandle handle, const char *xsdString);
838 
839 
864 DLL_EXPORT ReturnCode tixiDTDValidate (const TixiDocumentHandle handle, const char *DTDFilename);
906 DLL_EXPORT ReturnCode tixiGetTextElement (const TixiDocumentHandle handle,
907  const char *elementPath, char **text);
908 
909 
939 DLL_EXPORT ReturnCode tixiGetIntegerElement (const TixiDocumentHandle handle, const char *elementPath, int *number);
940 
969 DLL_EXPORT ReturnCode tixiGetDoubleElement (const TixiDocumentHandle handle, const char *elementPath, double *number);
970 
971 
1002 DLL_EXPORT ReturnCode tixiGetBooleanElement (const TixiDocumentHandle handle, const char *elementPath, int *boolean);
1003 
1004 
1032 DLL_EXPORT ReturnCode tixiUpdateTextElement (const TixiDocumentHandle handle, const char *elementPath, const char *text);
1033 
1034 
1065 DLL_EXPORT ReturnCode tixiUpdateDoubleElement (const TixiDocumentHandle handle, const char *elementPath, double number, const char *format);
1066 
1097 DLL_EXPORT ReturnCode tixiUpdateIntegerElement (const TixiDocumentHandle handle, const char *elementPath, int number, const char *format);
1098 
1126 DLL_EXPORT ReturnCode tixiUpdateBooleanElement (const TixiDocumentHandle handle, const char *elementPath, int boolean);
1127 
1128 
1161 DLL_EXPORT ReturnCode tixiAddTextElement (const TixiDocumentHandle handle, const char *parentPath, const char *elementName, const char *text);
1162 
1163 
1204 DLL_EXPORT ReturnCode tixiAddTextElementNS (const TixiDocumentHandle handle, const char *parentPath,
1205  const char *qualifiedName, const char *namespaceURI, const char *text);
1206 
1207 
1208 
1245 DLL_EXPORT ReturnCode tixiAddTextElementAtIndex (const TixiDocumentHandle handle, const char *parentPath, const char *elementName, const char *text, int index);
1246 
1290 DLL_EXPORT ReturnCode tixiAddTextElementNSAtIndex(const TixiDocumentHandle handle, const char *parentPath,
1291  const char* qualifiedName, const char* namespaceURI, const char *text, int index);
1292 
1325 DLL_EXPORT ReturnCode tixiAddBooleanElement (const TixiDocumentHandle handle, const char *parentPath, const char *elementName, int boolean);
1326 
1327 
1368 DLL_EXPORT ReturnCode tixiAddBooleanElementNS (const TixiDocumentHandle handle, const char *parentPath,
1369  const char *qualifiedName, const char* namespaceURI, int boolean);
1370 
1371 
1403 DLL_EXPORT ReturnCode tixiAddDoubleElement (const TixiDocumentHandle handle,
1404  const char *parentPath, const char *elementName,
1405  double number, const char *format);
1406 
1407 
1447 DLL_EXPORT ReturnCode tixiAddDoubleElementNS (const TixiDocumentHandle handle,
1448  const char *parentPath, const char *qualifiedName, const char* namespaceURI,
1449  double number, const char *format);
1450 
1482 DLL_EXPORT ReturnCode tixiAddIntegerElement (const TixiDocumentHandle handle,
1483  const char *parentPath, const char *elementName,
1484  int number, const char *format);
1485 
1486 
1526 DLL_EXPORT ReturnCode tixiAddIntegerElementNS (const TixiDocumentHandle handle,
1527  const char *parentPath,
1528  const char *qualifiedName, const char *namespaceURI,
1529  int number, const char *format);
1530 
1531 
1576 DLL_EXPORT ReturnCode tixiAddFloatVector (const TixiDocumentHandle handle, const char *parentPath, const char *elementName, const double *vector, const int numElements, const char* format);
1577 
1578 
1615 DLL_EXPORT ReturnCode tixiUpdateFloatVector (const TixiDocumentHandle handle, const char *path, const double *vector, const int numElements, const char* format);
1616 
1617 
1646 DLL_EXPORT ReturnCode tixiCreateElement (const TixiDocumentHandle handle, const char *parentPath, const char *elementName);
1647 
1648 
1685 DLL_EXPORT ReturnCode tixiCreateElementNS (const TixiDocumentHandle handle, const char *parentPath,
1686  const char *qualifiedName, const char* namespaceURI);
1687 
1688 
1720 DLL_EXPORT ReturnCode tixiCreateElementAtIndex (const TixiDocumentHandle handle, const char *parentPath, const char *elementName, int index);
1721 
1722 
1762 DLL_EXPORT ReturnCode tixiCreateElementNSAtIndex (const TixiDocumentHandle handle, const char *parentPath,
1763  const char *qualifiedName, int index, const char* namespaceURI);
1764 
1765 
1787 DLL_EXPORT ReturnCode tixiRenameElement(const TixiDocumentHandle handle,
1788  const char* parentPath,
1789  const char* oldName,
1790  const char* newName);
1791 
1815 DLL_EXPORT ReturnCode tixiRemoveElement (const TixiDocumentHandle handle, const char *elementPath);
1816 
1817 
1840 DLL_EXPORT ReturnCode tixiGetNodeType (const TixiDocumentHandle handle,
1841  const char *nodePath, char **nodeType);
1842 
1843 
1868 DLL_EXPORT ReturnCode tixiGetNamedChildrenCount (const TixiDocumentHandle handle,
1869  const char *elementPath, const char *childName,
1870  int *count);
1871 
1896 DLL_EXPORT ReturnCode tixiGetChildNodeName (const TixiDocumentHandle handle,
1897  const char *parentElementPath, int index, char **name);
1898 
1919 DLL_EXPORT ReturnCode tixiGetNumberOfChilds(const TixiDocumentHandle handle, const char *elementPath, int* nChilds);
1920 
1939 DLL_EXPORT ReturnCode tixiSwapElements(const TixiDocumentHandle handle, const char* element1Path, const char* element2Path);
1940 
1951 
1985 DLL_EXPORT ReturnCode tixiGetTextAttribute (const TixiDocumentHandle handle,
1986  const char *elementPath, const char *attributeName,
1987  char **text);
1988 
2022 DLL_EXPORT ReturnCode tixiGetIntegerAttribute (const TixiDocumentHandle handle,
2023  const char *elementPath, const char *attributeName,
2024  int *number);
2025 
2059 DLL_EXPORT ReturnCode tixiGetBooleanAttribute (const TixiDocumentHandle handle,
2060  const char *elementPath, const char *attributeName,
2061  int *boolean);
2062 
2096 DLL_EXPORT ReturnCode tixiGetDoubleAttribute (const TixiDocumentHandle handle,
2097  const char *elementPath, const char *attributeName,
2098  double *number);
2099 
2100 
2101 
2102 
2138 DLL_EXPORT ReturnCode tixiAddTextAttribute (const TixiDocumentHandle handle,
2139  const char *elementPath, const char *attributeName,
2140  const char *attributeValue);
2141 
2142 
2183 DLL_EXPORT ReturnCode tixiAddDoubleAttribute (const TixiDocumentHandle handle,
2184  const char *elementPath, const char *attributeName,
2185  double number, const char *format);
2186 
2187 
2227 DLL_EXPORT ReturnCode tixiAddIntegerAttribute (const TixiDocumentHandle handle,
2228  const char *elementPath, const char *attributeName,
2229  int number, const char *format);
2230 
2259 DLL_EXPORT ReturnCode tixiRemoveAttribute (const TixiDocumentHandle handle,
2260  const char *elementPath, const char *attributeName);
2261 
2262 
2283 DLL_EXPORT ReturnCode tixiGetNumberOfAttributes(const TixiDocumentHandle handle, const char *elementPath, int* nAttributes);
2284 
2285 
2307 DLL_EXPORT ReturnCode tixiGetAttributeName(const TixiDocumentHandle handle, const char *elementPath, int attrIndex, char** attrName);
2308 
2374 
2375 
2398 DLL_EXPORT ReturnCode tixiRegisterNamespace(const TixiDocumentHandle handle, const char* namespaceURI, const char* prefix);
2399 
2400 
2421 DLL_EXPORT ReturnCode tixiRegisterNamespacesFromDocument(const TixiDocumentHandle handle);
2422 
2423 
2444 DLL_EXPORT ReturnCode tixiSetElementNamespace(const TixiDocumentHandle handle, const char* elementPath,
2445  const char* namespaceURI, const char* prefix);
2446 
2447 
2471 DLL_EXPORT ReturnCode tixiDeclareNamespace(const TixiDocumentHandle handle, const char* elementPath,
2472  const char* namespaceURI, const char* prefix);
2473 
2481 
2482 
2503 DLL_EXPORT ReturnCode tixiAddExternalLink (const TixiDocumentHandle handle, const char *parentPath,
2504  const char *url, const char *fileFormat);
2505 
2506 
2530 DLL_EXPORT ReturnCode tixiAddHeader (const TixiDocumentHandle handle, const char *toolName,
2531  const char *version, const char *authorName);
2532 
2533 
2534 
2559 DLL_EXPORT ReturnCode tixiAddCpacsHeader (const TixiDocumentHandle handle, const char *name, const char *creator,
2560  const char *version, const char *description, const char * cpacsVersion);
2561 
2562 
2577 DLL_EXPORT ReturnCode tixiCheckElement (const TixiDocumentHandle handle, const char *elementPath);
2578 
2579 
2593 DLL_EXPORT ReturnCode tixiCheckDocumentHandle (const TixiDocumentHandle handle);
2594 
2615 DLL_EXPORT ReturnCode tixiUsePrettyPrint(TixiDocumentHandle handle, int usePrettyPrint);
2616 
2639 
2647 
2648 
2662 DLL_EXPORT ReturnCode tixiSetCacheEnabled(TixiDocumentHandle handle, int enabled);
2663 
2672 
2712 DLL_EXPORT ReturnCode tixiAddDoubleListWithAttributes (const TixiDocumentHandle handle,
2713  const char *parentPath,
2714  const char *listName, const char *childName,
2715  const char *childAttributeName,
2716  const double *values, const char *format,
2717  const char **attributes, int nValues);
2718 
2740 DLL_EXPORT ReturnCode tixiGetVectorSize (const TixiDocumentHandle handle,
2741  const char *vectorPath, int *nElements);
2742 
2743 
2771 DLL_EXPORT ReturnCode tixiGetFloatVector (const TixiDocumentHandle handle, const char *vectorPath,
2772  double **vectorArray, const int eNumber);
2773 
2774 
2821 DLL_EXPORT ReturnCode tixiGetArrayDimensions (const TixiDocumentHandle handle,
2822  const char *arrayPath, int *dimensions);
2823 
2824 
2852 DLL_EXPORT ReturnCode tixiGetArrayDimensionSizes (const TixiDocumentHandle handle, const char *arrayPath,
2853  int *sizes, int *linearArraySize);
2854 
2855 
2882 DLL_EXPORT ReturnCode tixiGetArrayDimensionNames (const TixiDocumentHandle handle,
2883  const char *arrayPath, char **dimensionNames);
2884 
2911 DLL_EXPORT ReturnCode tixiGetArrayDimensionValues (const TixiDocumentHandle handle, const char *arrayPath,
2912  const int dimension, double *dimensionValues);
2913 
2914 
2940 DLL_EXPORT ReturnCode tixiGetArrayParameters (const TixiDocumentHandle handle, const char *arrayPath, int *parameters);
2941 
2942 
2968 DLL_EXPORT ReturnCode tixiGetArrayParameterNames (const TixiDocumentHandle handle,
2969  const char *arrayPath, char **parameterNames);
2970 
2971 
3004 DLL_EXPORT ReturnCode tixiGetArray (const TixiDocumentHandle handle, const char *arrayPath,
3005  const char *elementName, int arraySize, double **values);
3006 
3007 
3024 DLL_EXPORT double tixiGetArrayValue(const double *array, const int *dimSize, const int *dimPos, const int dims);
3025 
3026 
3052 DLL_EXPORT ReturnCode tixiGetArrayElementCount (const TixiDocumentHandle handle, const char *arrayPath,
3053  const char *elementName, int *elements);
3054 
3055 
3081 DLL_EXPORT ReturnCode tixiGetArrayElementNames (const TixiDocumentHandle handle, const char *arrayPath,
3082  const char *elementType, char **elementNames);
3083 
3084 
3120 DLL_EXPORT ReturnCode tixiAddPoint (const TixiDocumentHandle handle, const char *pointParentPath,
3121  double x, double y, double z, const char *format);
3122 
3163 DLL_EXPORT ReturnCode tixiGetPoint (const TixiDocumentHandle handle,
3164  const char *pointParentPath,
3165  double *x, double *y, double *z);
3166 
3167 
3168 
3191 DLL_EXPORT ReturnCode tixiCheckAttribute(TixiDocumentHandle handle, const char *elementPath, const char *attributeName);
3192 
3193 
3200 
3216 DLL_EXPORT ReturnCode tixiXSLTransformationToString(TixiDocumentHandle handle, const char *xslFilename, char **resultText);
3217 
3233 DLL_EXPORT ReturnCode tixiXSLTransformationToFile(TixiDocumentHandle handle, const char *xslFilename, const char *resultFilename);
3234 
3235 
3243 
3259 DLL_EXPORT ReturnCode tixiXPathEvaluateNodeNumber(TixiDocumentHandle handle, const char *xPathExpression, int *number);
3260 
3274 DLL_EXPORT ReturnCode tixiXPathExpressionGetXPath(TixiDocumentHandle handle, const char *xPathExpression, int index, char** xPath);
3275 
3299 DLL_EXPORT ReturnCode tixiXPathExpressionGetTextByIndex(TixiDocumentHandle handle, const char *xPathExpression, int elementNumber, char **text);
3300 
3301 
3309 
3324 DLL_EXPORT ReturnCode tixiUIDCheckDuplicates(TixiDocumentHandle handle);
3325 
3326 
3342 DLL_EXPORT ReturnCode tixiUIDCheckLinks(TixiDocumentHandle handle);
3343 
3364 DLL_EXPORT ReturnCode tixiUIDGetXPath(TixiDocumentHandle handle, const char *uID, char **xPath);
3365 
3366 
3383 DLL_EXPORT ReturnCode tixiUIDCheckExists(TixiDocumentHandle handle, const char *uID);
3384 
3385 
3408 DLL_EXPORT ReturnCode tixiUIDSetToXPath(TixiDocumentHandle handle, const char *xPath, const char *uID);
3409 
3410 
3414 #endif /* TIXI_H */
3415 
3416 
3417 #ifdef __cplusplus
3418 }
3419 #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".
DLL_EXPORT ReturnCode tixiAddExternalLink(const TixiDocumentHandle handle, const char *parentPath, const char *url, const char *fileFormat)
Add a name of an external file as a url.
DLL_EXPORT ReturnCode tixiGetArrayDimensions(const TixiDocumentHandle handle, const char *arrayPath, int *dimensions)
Retrieves the number of dimensions of an Array.
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.
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 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 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.
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.
DLL_EXPORT ReturnCode tixiGetArrayParameterNames(const TixiDocumentHandle handle, const char *arrayPath, char **parameterNames)
Retrieves names of all parameters.
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.
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.
void(* TixiPrintMsgFnc)(MessageType type, const char *msg)
Definition: tixi.h:408
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 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 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:236
#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.
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:351
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 tixiUpdateDoubleElement(const TixiDocumentHandle handle, const char *elementPath, double number, const char *format)
Updates the double content of an element.
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.
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 tixiGetArrayDimensionNames(const TixiDocumentHandle handle, const char *arrayPath, char **dimensionNames)
Retrieves the names of all dimensions.
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 tixiGetArrayParameters(const TixiDocumentHandle handle, const char *arrayPath, int *parameters)
Retrieves the number of parameters of an array.
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.
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 tixiGetArrayElementNames(const TixiDocumentHandle handle, const char *arrayPath, const char *elementType, char **elementNames)
Helper function.
DLL_EXPORT ReturnCode tixiGetArrayElementCount(const TixiDocumentHandle handle, const char *arrayPath, const char *elementName, int *elements)
Helper function.
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 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.
DLL_EXPORT ReturnCode tixiGetNumberOfChilds(const TixiDocumentHandle handle, const char *elementPath, int *nChilds)
Returns the number of child elements beneath a given path.
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...
ReturnCode
Definition: tixi.h:248
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.
OpenMode
Definition: tixi.h:372
DLL_EXPORT ReturnCode tixiOpenDocumentRecursive(const char *xmlFilename, TixiDocumentHandle *handle, OpenMode oMode)
Open an XML-file for reading. It acts like tixiOpenDocument.
Definition: tixi.h:353
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:250
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:252
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:389
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 tixiRenameElement(const TixiDocumentHandle handle, const char *parentPath, const char *oldName, const char *newName)
Renames an element.

Generated Thu Sep 12 2019 15:24:30, by Martin Siggel DLR