1 | /*
|
---|
2 | Copyright (C) 2005-2006 Feeling Software Inc.
|
---|
3 | MIT License: http://www.opensource.org/licenses/mit-license.php
|
---|
4 | */
|
---|
5 | /*
|
---|
6 | Based on the FS Import classes:
|
---|
7 | Copyright (C) 2005-2006 Feeling Software Inc
|
---|
8 | Copyright (C) 2005-2006 Autodesk Media Entertainment
|
---|
9 | MIT License: http://www.opensource.org/licenses/mit-license.php
|
---|
10 | */
|
---|
11 |
|
---|
12 | #ifndef _FU_XML_PARSER_H_
|
---|
13 | #define _FU_XML_PARSER_H_
|
---|
14 |
|
---|
15 | #ifdef HAS_LIBXML
|
---|
16 |
|
---|
17 | namespace FUXmlParser
|
---|
18 | {
|
---|
19 | // Retrieve specific child nodes
|
---|
20 | FCOLLADA_EXPORT xmlNode* FindChildByType(xmlNode* parent, const char* type);
|
---|
21 | FCOLLADA_EXPORT xmlNode* FindChildByName(xmlNode* parent, const char* name);
|
---|
22 | FCOLLADA_EXPORT void FindChildrenByType(xmlNode* parent, const char* type, xmlNodeList& nodes);
|
---|
23 | FCOLLADA_EXPORT xmlNode* FindChildByProperty(xmlNode* parent, const char* prop, const char* val );
|
---|
24 | FCOLLADA_EXPORT xmlNode* FindNodeInListByProperty(xmlNodeList list, const char* property, const char* prop);
|
---|
25 |
|
---|
26 | // Retrieve node property and content
|
---|
27 | FCOLLADA_EXPORT bool HasNodeProperty(xmlNode* node, const char* property);
|
---|
28 | FCOLLADA_EXPORT string ReadNodeProperty(xmlNode* node, const char* property);
|
---|
29 | FCOLLADA_EXPORT FUCrc32::crc32 ReadNodePropertyCRC(xmlNode* node, const char* property);
|
---|
30 | FCOLLADA_EXPORT const char* ReadNodeContentDirect(xmlNode* node);
|
---|
31 | FCOLLADA_EXPORT string ReadNodeContentFull(xmlNode* node);
|
---|
32 |
|
---|
33 | // Process values
|
---|
34 | FCOLLADA_EXPORT void XmlToString(string& s);
|
---|
35 | };
|
---|
36 |
|
---|
37 | inline bool IsEquivalent(const xmlChar* sz1, const char* sz2) { return IsEquivalent((const char*) sz1, sz2); }
|
---|
38 |
|
---|
39 | #endif // HAS_LIBXML
|
---|
40 |
|
---|
41 | #endif //_FU_XML_PARSER_H_
|
---|