15 #include <libxml/tree.h>
30 bool openFile(
const std::string& fileName,
31 const std::string& virtualTextureFilename, std::string& parseError);
34 const std::string& fileName()
const;
39 const std::string& virtualTextureFileName()
const;
43 static bool publish(
const std::string& fileName,
44 const std::string& virtualTextureFilename,
45 const std::string& outputFileName,
46 bool encryptingData,
bool removeVT, std::string& parseError,
47 bool extendGridLevelZero,
float extendGridLevelZeroTo);
50 const char* currentElementType()
const;
53 const char* currentElementName()
const;
56 const char* currentElementReference()
const;
60 std::string currentElementNameOrGenerateUnique();
63 const char* currentElementText()
const;
66 bool getCurrentElementValue(std::string& value)
const;
69 bool getCurrentElementValue(
int& value)
const;
72 bool getCurrentElementValue(
unsigned int& value)
const;
75 bool getCurrentElementValue(
double& value)
const;
78 unsigned int numberOfChildElements()
const;
82 bool readFirstChildElement();
85 bool readNextElement();
88 bool readPreviousElement();
91 bool readParentElement();
95 static xmlDocPtr createDocument(
const std::string& file,
96 std::string& parseError );
98 static int countChildrenWithName( xmlNodePtr node,
99 const std::string& nodeName );
101 static xmlNodePtr findChildWithName(
const xmlNodePtr node,
102 const std::string& nodeName,
const int occurance = 0);
104 static void replaceAll( std::string& result,
105 const std::string& replaceWhat,
const std::string& replaceWithWhat );
107 static xmlNodePtr findDatabaseNode( xmlDocPtr xmlDocument,
108 std::string& parseError );
110 static xmlNodePtr findChildWithAttribute( xmlNodePtr node,
111 const std::string& nodeName,
const std::string& attrName,
112 const std::string& attrValue );
114 static const char* attribute( xmlNodePtr node,
115 const std::string& attrName );
117 static const char* text(xmlNodePtr node);
119 static bool setText( xmlNodePtr node,
const std::string& text );