168 #if defined(WIN32) || defined(UNDER_CE) || defined(_WIN32) || defined(WIN64) 177 #ifdef _USE_XMLPARSER_DLL 179 #define XMLDLLENTRY __declspec(dllexport) 181 #define XMLDLLENTRY __declspec(dllimport) 193 #define XML_NO_WIDE_CHAR 194 #define strcasecmp(a, b) stricmp(a, b) 195 #define strncasecmp(a, b, c) _strnicmp(a, b, c) 197 #define _ftime(a) ftime(a) 198 #define _strnicmp(a, b, c) strnicmp(a, b, c) 199 #define _errno errno #endif 202 #ifdef XML_NO_WIDE_CHAR 211 #ifndef XML_NO_WIDE_CHAR 219 #define _CXML(c) L##c 220 #define XMLCSTR const wchar_t* 221 #define XMLSTR wchar_t* 222 #define XMLCHAR wchar_t 225 #define XMLCSTR const char* 421 XMLSTR createXMLString(
int nFormat = 1,
int* pnSize =
nullptr)
const;
432 XMLCSTR filename,
const char* encoding =
nullptr,
433 char nFormat = 1)
const;
450 XMLCSTR getText(
int i = 0)
const;
453 XMLNode getChildNode(
int i = 0)
const;
469 XMLNode getChildNodeWithAttribute(
471 XMLCSTR attributeValue =
nullptr,
472 int* i =
nullptr)
const;
476 XMLSTR path,
char createNodeIfMissing = 0,
XMLCHAR sep =
'/');
485 int nChildNode()
const;
487 XMLCSTR getAttributeName(
int i = 0)
const;
488 XMLCSTR getAttributeValue(
int i = 0)
const;
503 int nAttribute()
const;
510 int nElement()
const;
511 char isEmpty()
const;
512 char isDeclaration()
const;
543 static XMLNode createXMLTopNode(
625 void deleteNodeContent();
629 void deleteAttribute(
631 void deleteAttribute(
XMLCSTR lpszName);
643 void deleteText(
XMLCSTR lpszValue);
650 void deleteClear(
XMLCSTR lpszValue);
693 static XMLNode createXMLTopNode_WOSD(
780 char_encoding_error = 0,
781 char_encoding_UTF8 = 1,
782 char_encoding_legacy = 2,
783 char_encoding_ShiftJIS = 3,
784 char_encoding_GB2312 = 4,
785 char_encoding_Big5 = 5,
786 char_encoding_GBK = 6
793 static char setGlobalOptions(
871 static XMLCharEncoding guessCharEncoding(
872 void*
buffer,
int bufLen,
char useXMLEncodingAttribute = 1);
920 char parseClearTag(
void* px,
void* pa);
921 char maybeAddTxT(
void* pa,
XMLCSTR tokenPStr);
922 int ParseXMLElement(
void* pXML);
925 int indexText(
XMLCSTR lpszValue)
const;
926 int indexClear(
XMLCSTR lpszValue)
const;
931 void emptyTheNode(
char force);
934 static int CreateXMLStringR(
935 XMLNodeData* pEntry,
XMLSTR lpszMarker,
int nFormat);
937 static void exactMemory(XMLNodeData* d);
938 static int detachFromParent(XMLNodeData* d);
1029 static XMLSTR toXMLUnSafe(
1031 static int lengthXMLString(
1072 static int encodeLength(
int inBufLen,
char formatted = 0);
1089 unsigned char* inByteBuf,
unsigned int inByteLen,
1090 char formatted = 0);
1095 static unsigned int decodeSize(
XMLCSTR inString,
XMLError* xe =
nullptr);
1104 unsigned char* decode(
1105 XMLCSTR inString,
int* outByteLen =
nullptr,
1116 static unsigned char decode(
1117 XMLCSTR inString,
unsigned char* outByteBuf,
int inMaxByteOutBuflen,
1123 void alloc(
int newsize);
XMLElementType
Enumeration used to manage type of data.
XMLDLLENTRY XMLCHAR xmltoc(XMLCSTR xmlString, XMLCHAR defautValue=_CXML('\0'))
enum XMLElementType etype
This dictates what's the content of the XMLNodeContent.
Main Class representing a XML node.
XMLCharEncoding
childNode with the specified name if (name==nullptr) return the position of the ith childNode ...
struct XMLNodeContents XMLNodeContents
This structure is given by the function XMLNode::enumContents.
Structure for XML clear (unformatted) node (usually comments)
This structure is given by the function XMLNode::enumContents.
XMLDLLENTRY XMLSTR stringDup(XMLCSTR source, int cbData=-1)
Duplicate (copy in a new allocated buffer) the source string.
struct XMLClear XMLClear
Structure for XML clear (unformatted) node (usually comments)
static XMLClear emptyXMLClear
struct XMLResults XMLResults
Structure used to obtain error details if the parse fails.
struct XMLAttribute XMLAttribute
Structure for XML attribute.
XMLError
Enumeration for XML parse errors.
XMLDLLENTRY XMLCSTR xmltoa(XMLCSTR xmlString, XMLCSTR defautValue=_CXML(""))
static XMLNode::XMLCharEncoding characterEncoding
XMLAttribute * pAttribute
static char dropWhiteSpace
struct XMLNode::XMLNodeDataTag XMLNodeData
struct XMLNodeDataTag * pParent
static XMLAttribute emptyXMLAttribute
int XMLElementPosition
XMLElementPosition are not interchangeable with simple indexes.
XMLDLLENTRY char xmltob(XMLCSTR xmlString, char defautValue=0)
GLuint const GLchar * name
GLsizei GLsizei GLchar * source
Structure for XML attribute.
static char guessWideCharChars
XMLDLLENTRY long xmltol(XMLCSTR xmlString, long defautValue=0)
static char removeCommentsInMiddleOfText
static XMLNode emptyXMLNode
GLubyte GLubyte GLubyte a
XMLDLLENTRY void freeXMLString(XMLSTR t)
to free the string allocated inside the "stringDup" function or the "createXMLString" function...
struct XMLDLLENTRY XMLNode XMLNode
Main Class representing a XML node.
Structure used to obtain error details if the parse fails.
XMLDLLENTRY double xmltof(XMLCSTR xmlString, double defautValue=.0)
XMLDLLENTRY int xmltoi(XMLCSTR xmlString, int defautValue=0)