85 #ifndef __INCLUDE_XML_NODE__
86 #define __INCLUDE_XML_NODE__
90 #if defined(UNICODE) || defined(_UNICODE)
99 #if defined(WIN32) || defined(UNDER_CE) || defined(_WIN32) || defined(WIN64) || defined(__BORLANDC__)
107 #ifdef _USE_XMLPARSER_DLL
109 #define XMLDLLENTRY __declspec(dllexport)
111 #define XMLDLLENTRY __declspec(dllimport)
120 #ifdef XML_NO_WIDE_CHAR
129 #ifndef XML_NO_WIDE_CHAR
137 #define _CXML(c) L ## c
138 #define XMLCSTR const wchar_t *
139 #define XMLSTR wchar_t *
140 #define XMLCHAR wchar_t
143 #define XMLCSTR const char *
144 #define XMLSTR char *
231 struct XMLNodeDataTag;
234 XMLNode(
struct XMLNodeDataTag *pParent,
XMLSTR lpszName,
char isDeclaration);
236 XMLNode(
struct XMLNodeDataTag *p);
293 XMLSTR createXMLString(
int nFormat=1,
int *pnSize=NULL)
const;
301 const char *encoding=NULL,
302 char nFormat=1)
const;
314 XMLCSTR getText(
int i=0)
const;
317 XMLNode getChildNode(
int i=0)
const;
329 int nChildNode(
XMLCSTR name)
const;
330 int nChildNode()
const;
332 XMLCSTR getAttributeName(
int i=0)
const;
333 XMLCSTR getAttributeValue(
int i=0)
const;
334 char isAttributeSet(
XMLCSTR name)
const;
337 int nAttribute()
const;
341 int nElement()
const;
342 char isEmpty()
const;
343 char isDeclaration()
const;
404 void deleteNodeContent();
406 void deleteAttribute(
int i=0);
407 void deleteAttribute(
XMLCSTR lpszName);
409 void deleteText(
int i=0);
410 void deleteText(
XMLCSTR lpszValue);
411 void deleteClear(
int i=0);
412 void deleteClear(
XMLCSTR lpszValue);
481 char_encoding_error=0,
482 char_encoding_UTF8=1,
483 char_encoding_legacy=2,
484 char_encoding_ShiftJIS=3,
485 char_encoding_GB2312=4,
486 char_encoding_Big5=5,
495 char dropWhiteSpace=1,
char removeCommentsInMiddleOfText=1);
547 static XMLCharEncoding guessCharEncoding(
void *buffer,
int bufLen,
char useXMLEncodingAttribute=1);
563 typedef struct XMLNodeDataTag
571 struct XMLNodeDataTag *pParent;
581 char parseClearTag(
void *px,
void *pa);
582 char maybeAddTxT(
void *pa,
XMLCSTR tokenPStr);
583 int ParseXMLElement(
void *pXML);
584 void *addToOrder(
int memInc,
int *_pos,
int nc,
void *p,
int size,
XMLElementType xtype);
585 int indexText(
XMLCSTR lpszValue)
const;
586 int indexClear(
XMLCSTR lpszValue)
const;
591 void emptyTheNode(
char force);
593 static int CreateXMLStringR(XMLNodeData *pEntry,
XMLSTR lpszMarker,
int nFormat);
594 static int removeOrderElement(XMLNodeData *d,
XMLElementType t,
int index);
595 static void exactMemory(XMLNodeData *d);
596 static int detachFromParent(XMLNodeData *d);
669 static int lengthXMLString(
XMLCSTR source);
698 static int encodeLength(
int inBufLen,
char formatted=0);
705 XMLSTR encode(
unsigned char *inByteBuf,
unsigned int inByteLen,
char formatted=0);
715 unsigned char* decode(
XMLCSTR inString,
int *outByteLen=NULL,
XMLError *xe=NULL);
721 static unsigned char decode(
XMLCSTR inString,
unsigned char *outByteBuf,
int inMaxByteOutBuflen,
XMLError *xe=NULL);
726 void alloc(
int newsize);