00001
00002
00003
00004
00005
00006
00007
00008
00009
00010
00011
00012
00013
00014
00015 #ifndef _FU_XML_PARSER_H_
00016 #define _FU_XML_PARSER_H_
00017
00018 #ifdef HAS_LIBXML
00019
00020 typedef fm::pvector<struct _xmlNode> xmlNodeList;
00022 namespace FUXmlParser
00023 {
00024
00025 FCOLLADA_EXPORT fm::string XmlToString(const char* s);
00026 #ifdef UNICODE
00027 FCOLLADA_EXPORT fstring XmlToString(const fchar* s);
00028 #endif // UNICODE
00029
00030
00031 FCOLLADA_EXPORT xmlNode* FindChildByType(xmlNode* parent, const char* type);
00032 FCOLLADA_EXPORT xmlNode* FindChildByName(xmlNode* parent, const char* name);
00033 FCOLLADA_EXPORT void FindChildrenByType(xmlNode* parent, const char* type, xmlNodeList& nodes);
00034 FCOLLADA_EXPORT xmlNode* FindChildByProperty(xmlNode* parent, const char* prop, const char* val);
00035 FCOLLADA_EXPORT xmlNode* FindNodeInListByProperty(xmlNodeList list, const char* property, const char* prop);
00036
00037
00038 FCOLLADA_EXPORT bool HasNodeProperty(xmlNode* node, const char* property);
00039 FCOLLADA_EXPORT fm::string ReadNodeProperty(xmlNode* node, const char* property);
00040 FCOLLADA_EXPORT FUCrc32::crc32 ReadNodePropertyCRC(xmlNode* node, const char* property);
00041 FCOLLADA_EXPORT const char* ReadNodeContentDirect(xmlNode* node);
00042 FCOLLADA_EXPORT fm::string ReadNodeContentFull(xmlNode* node);
00043 };
00044
00045 inline bool IsEquivalent(const xmlChar* sz1, const char* sz2) { return IsEquivalent((const char*) sz1, sz2); }
00046
00047 #endif // HAS_LIBXML
00048
00049 #endif //_FU_XML_PARSER_H_