15 #ifndef __UT_XMLSaxParser__
16 #define __UT_XMLSaxParser__
26 struct _xmlSAXHandler;
43 bool parseFileUTF8(
const char *
filename);
56 virtual void onStartDocument();
57 virtual void onEndDocument();
61 virtual void onCharacters(
const UT_String &characters);
62 virtual void onCDATABlock(
const UT_String &characters);
63 virtual void onComment(
const UT_String &text);
64 virtual void onWarning(
const UT_String &text);
65 virtual void onError(
const UT_String &text);
66 virtual void onFatalError(
const UT_String &text);
81 if (getAttribute(attribs, name, tmp))
90 return getAttribute(attribs, name, tmp);
98 if (getAttribute(attribs, name, tmp))
99 return atoi(tmp.
c_str());
104 const char *
name,
double defValue)
107 if (getAttribute(attribs, name, tmp))
108 return atof(tmp.
c_str());
118 friend class utSaxParserCallback;
GT_API const UT_StringHolder filename
GLsizei const GLfloat * value
const char * c_str() const
static bool hasAttribute(const UT_XMLAttributeList &attribs, const char *name)
std::unique_ptr< T, Deleter > UT_UniquePtr
A smart pointer for unique ownership of dynamically allocated objects.
static double getDoubleAttribute(const UT_XMLAttributeList &attribs, const char *name, double defValue)
static int getIntegerAttribute(const UT_XMLAttributeList &attribs, const char *name)
UT_Array< UT_XMLAttribute * > UT_XMLAttributeList
A list of XML element attributes.
std::pair< UT_String, UT_String > UT_XMLAttribute
An XML element attribute as defined by a name and a value.
GLuint const GLchar * name
static UT_String getStringAttribute(const UT_XMLAttributeList &attribs, const char *name)
struct _xmlSAXHandler * xmlSAXHandlerPtr
virtual bool parseContextSubclass()=0