FUtils/FUXmlParser.h

00001 /*
00002     Copyright (C) 2005-2006 Feeling Software Inc.
00003     MIT License: http://www.opensource.org/licenses/mit-license.php
00004 */
00005 /*
00006     Based on the FS Import classes:
00007     Copyright (C) 2005-2006 Feeling Software Inc
00008     Copyright (C) 2005-2006 Autodesk Media Entertainment
00009     MIT License: http://www.opensource.org/licenses/mit-license.php
00010 */
00011 
00012 #ifndef _FU_XML_PARSER_H_
00013 #define _FU_XML_PARSER_H_
00014 
00015 #ifdef HAS_LIBXML
00016 
00017 namespace FUXmlParser
00018 {
00019     // Retrieve specific child nodes
00020     FCOLLADA_EXPORT xmlNode* FindChildByType(xmlNode* parent, const char* type);
00021     FCOLLADA_EXPORT xmlNode* FindChildByName(xmlNode* parent, const char* name);
00022     FCOLLADA_EXPORT void FindChildrenByType(xmlNode* parent, const char* type, xmlNodeList& nodes);
00023     FCOLLADA_EXPORT xmlNode* FindChildByProperty(xmlNode* parent, const char* prop, const char* val );
00024     FCOLLADA_EXPORT xmlNode* FindNodeInListByProperty(xmlNodeList list, const char* property, const char* prop);
00025 
00026     // Retrieve node property and content
00027     FCOLLADA_EXPORT bool HasNodeProperty(xmlNode* node, const char* property);
00028     FCOLLADA_EXPORT string ReadNodeProperty(xmlNode* node, const char* property);
00029     FCOLLADA_EXPORT FUCrc32::crc32 ReadNodePropertyCRC(xmlNode* node, const char* property);
00030     FCOLLADA_EXPORT const char* ReadNodeContentDirect(xmlNode* node);
00031     FCOLLADA_EXPORT string ReadNodeContentFull(xmlNode* node);
00032 
00033     // Process values
00034     FCOLLADA_EXPORT void XmlToString(string& s);
00035 };
00036 
00037 inline bool IsEquivalent(const xmlChar* sz1, const char* sz2) { return IsEquivalent((const char*) sz1, sz2); }
00038 
00039 #endif // HAS_LIBXML
00040 
00041 #endif //_FU_XML_PARSER_H_

Generated on Fri May 12 16:44:39 2006 for FCollada by  doxygen 1.4.6-NO