#include "xmlParser.h"
#include <Windows.h>
#include <memory.h>
#include <cassert>
#include <cstdio>
#include <cstring>
#include <cstdlib>
Go to the source code of this file.
Classes | |
struct | ALLXMLClearTag |
struct | XMLCharacterEntity |
struct | XML |
struct | NextToken |
Macros | |
#define | _CRT_SECURE_NO_DEPRECATE |
#define | WIN32_LEAN_AND_MEAN |
#define | INDENTCHAR _CXML('\t') |
#define | XML_isSPACECHAR(ch) ((ch==_CXML('\n'))||(ch==_CXML(' '))||(ch== _CXML('\t'))||(ch==_CXML('\r'))) |
#define | MEMORYINCREASE 50 |
#define | LENSTR(lpsz) (lpsz ? xstrlen(lpsz) : 0) |
#define | BASE64DECODE_READ_NEXT_CHAR(c) |
Typedefs | |
typedef enum XMLTokenTypeTag | XMLTokenType |
typedef struct XML | XML |
typedef enum Attrib | Attrib |
typedef enum Status | Status |
Enumerations | |
enum | XMLTokenTypeTag { eTokenText = 0, eTokenQuotedText, eTokenTagStart, eTokenTagEnd, eTokenCloseTag, eTokenEquals, eTokenDeclaration, eTokenShortHandClose, eTokenClear, eTokenError } |
enum | Attrib { eAttribName = 0, eAttribEquals, eAttribValue } |
enum | Status { eInsideTag = 0, eOutsideTag } |
Functions | |
void | freeXMLString (XMLSTR t) |
to free the string allocated inside the "stringDup" function or the "createXMLString" function. More... | |
int | mmin (const int t1, const int t2) |
char | myIsTextWideChar (const void *b, int l) |
char * | myWideCharToMultiByte (const wchar_t *s) |
static FILE * | xfopen (XMLCSTR filename, XMLCSTR mode) |
static int | xstrlen (XMLCSTR c) |
static int | xstrnicmp (XMLCSTR c1, XMLCSTR c2, int l) |
static int | xstricmp (XMLCSTR c1, XMLCSTR c2) |
static int | xstrncmp (XMLCSTR c1, XMLCSTR c2, int l) |
static XMLSTR | xstrstr (XMLCSTR c1, XMLCSTR c2) |
static XMLSTR | xstrcpy (XMLSTR c1, XMLCSTR c2) |
char | xmltob (XMLCSTR t, char v) |
int | xmltoi (XMLCSTR t, int v) |
long | xmltol (XMLCSTR t, long v) |
double | xmltof (XMLCSTR t, double v) |
XMLCSTR | xmltoa (XMLCSTR t, XMLCSTR v) |
XMLCHAR | xmltoc (XMLCSTR t, XMLCHAR v) |
XMLSTR | stringDup (XMLCSTR lpszData, int cbData) |
Duplicate (copy in a new allocated buffer) the source string. More... | |
XMLSTR | fromXMLString (XMLCSTR s, int lo, XML *pXML) |
char | myTagCompare (XMLCSTR cclose, XMLCSTR copen) |
static XMLCHAR | getNextChar (XML *pXML) |
static NextToken | GetNextToken (XML *pXML, int *pcbToken, enum XMLTokenTypeTag *pType) |
static void | myFree (void *p) |
static void * | myRealloc (void *p, int newsize, int memInc, int sizeofElem) |
static void | CountLinesAndColumns (XMLCSTR lpXML, int nUpto, XMLResults *pResults) |
static void | charmemset (XMLSTR dest, XMLCHAR c, int l) |
Variables | |
static XMLNode::XMLCharEncoding | characterEncoding =XMLNode::char_encoding_UTF8 |
static char | guessWideCharChars =1 |
static char | dropWhiteSpace =1 |
static char | removeCommentsInMiddleOfText =1 |
static ALLXMLClearTag | XMLClearTags [] |
static XMLCharacterEntity | XMLEntities [] |
static const char | XML_utf8ByteTable [256] |
static const char | XML_legacyByteTable [256] |
static const char | XML_sjisByteTable [256] |
static const char | XML_gb2312ByteTable [256] |
static const char | XML_gbk_big5_ByteTable [256] |
static const char * | XML_ByteTable =(const char *)XML_utf8ByteTable |
static const char | base64Fillchar = _CXML('=') |
XMLCSTR | base64EncodeTable =_CXML("ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/") |
const unsigned char | base64DecodeTable [] |
#define _CRT_SECURE_NO_DEPRECATE |
Definition at line 11 of file xmlParser.cpp.
#define BASE64DECODE_READ_NEXT_CHAR | ( | c | ) |
Referenced by XMLParserBase64Tool::decode().
Definition at line 69 of file xmlParser.cpp.
Referenced by XMLNode::CreateXMLStringR().
#define LENSTR | ( | lpsz | ) | (lpsz ? xstrlen(lpsz) : 0) |
Referenced by XMLNode::CreateXMLStringR().
#define MEMORYINCREASE 50 |
Definition at line 1003 of file xmlParser.cpp.
Referenced by XMLNode::maybeAddTxT(), XMLNode::parseClearTag(), and XMLNode::ParseXMLElement().
#define WIN32_LEAN_AND_MEAN |
Definition at line 16 of file xmlParser.cpp.
#define XML_isSPACECHAR | ( | ch | ) | ((ch==_CXML('\n'))||(ch==_CXML(' '))||(ch== _CXML('\t'))||(ch==_CXML('\r'))) |
Definition at line 768 of file xmlParser.cpp.
Referenced by GetNextToken(), XMLNode::guessCharEncoding(), XMLNode::maybeAddTxT(), and myTagCompare().
typedef enum XMLTokenTypeTag XMLTokenType |
enum Attrib |
Enumerator | |
---|---|
eAttribName | |
eAttribEquals | |
eAttribValue |
Definition at line 514 of file xmlParser.cpp.
enum Status |
Enumerator | |
---|---|
eInsideTag | |
eOutsideTag |
Definition at line 523 of file xmlParser.cpp.
enum XMLTokenTypeTag |
Enumerator | |
---|---|
eTokenText | |
eTokenQuotedText | |
eTokenTagStart | |
eTokenTagEnd | |
eTokenCloseTag | |
eTokenEquals | |
eTokenDeclaration | |
eTokenShortHandClose | |
eTokenClear | |
eTokenError |
Definition at line 479 of file xmlParser.cpp.
Definition at line 1759 of file xmlParser.cpp.
Referenced by XMLNode::CreateXMLStringR().
|
static |
Definition at line 1622 of file xmlParser.cpp.
References _CXML, eXMLErrorNone, getNextChar(), XML::lpXML, XMLResults::nColumn, XML::nIndex, XMLResults::nLine, TRUE, and XMLCHAR.
Referenced by XMLNode::parseString().
Definition at line 652 of file xmlParser.cpp.
References _CXML, XMLCharacterEntity::c, XML::error, eXMLErrorCharacterCodeAbove255, eXMLErrorUnknownCharacterEntity, XMLCharacterEntity::l, XMLCharacterEntity::s, XML_ByteTable, XMLCHAR, XMLCSTR, XMLEntities, XMLSTR, and xstrnicmp().
Referenced by XMLNode::maybeAddTxT(), and XMLNode::ParseXMLElement().
Definition at line 789 of file xmlParser.cpp.
References XML::lpXML, XML::nIndex, XML_ByteTable, and XMLCHAR.
Referenced by CountLinesAndColumns(), and GetNextToken().
|
static |
Definition at line 802 of file xmlParser.cpp.
References _CXML, eTokenClear, eTokenCloseTag, eTokenDeclaration, eTokenEquals, eTokenError, eTokenQuotedText, eTokenShortHandClose, eTokenTagEnd, eTokenTagStart, eTokenText, FALSE, getNextChar(), ALLXMLClearTag::lpszOpen, XML::lpXML, XML::nIndex, ALLXMLClearTag::openTagLen, NextToken::pClr, NextToken::pStr, TRUE, XML_isSPACECHAR, XMLCHAR, XMLClearTags, and xstrncmp().
Referenced by XMLNode::ParseXMLElement().
|
inline |
Definition at line 33 of file xmlParser.cpp.
Referenced by mrpt::nav::CHolonomicFullEval::evalSingleTarget(), and XMLNode::guessCharEncoding().
Definition at line 1005 of file xmlParser.cpp.
Referenced by XMLNode::addAttribute_priv(), XMLNode::addClear_priv(), XMLNode::addText_priv(), and XMLNode::emptyTheNode().
char myIsTextWideChar | ( | const void * | b, |
int | l | ||
) |
Definition at line 148 of file xmlParser.cpp.
Referenced by XMLNode::guessCharEncoding(), and XMLNode::parseFile().
Definition at line 1006 of file xmlParser.cpp.
Referenced by XMLNode::addAttribute_priv(), and XMLNode::addToOrder().
Definition at line 771 of file xmlParser.cpp.
References _CXML, XML_isSPACECHAR, XMLCHAR, xstrlen(), and xstrnicmp().
Referenced by XMLNode::ParseXMLElement().
char* myWideCharToMultiByte | ( | const wchar_t * | s | ) |
Definition at line 175 of file xmlParser.cpp.
References XMLNode::char_encoding_UTF8, and characterEncoding.
Referenced by XMLNode::parseFile().
Definition at line 201 of file xmlParser.cpp.
References mrpt::system::os::fopen().
Referenced by XMLNode::openFileHelper(), XMLNode::parseFile(), and XMLNode::writeToFile().
Definition at line 212 of file xmlParser.cpp.
References mrpt::system::os::strcpy(), and XMLSTR.
Referenced by XMLNode::CreateXMLStringR(), and ToXMLStringTool::toXMLUnSafe().
Definition at line 208 of file xmlParser.cpp.
Referenced by XMLNode::getAttribute(), XMLNode::getChildNode(), XMLNode::getChildNodeWithAttribute(), XMLNode::isAttributeSet(), XMLNode::nChildNode(), and XMLNode::parseString().
|
inlinestatic |
Definition at line 202 of file xmlParser.cpp.
Referenced by XMLNode::maybeAddTxT(), myTagCompare(), XMLNode::parseClearTag(), and stringDup().
Definition at line 210 of file xmlParser.cpp.
Referenced by GetNextToken().
Definition at line 207 of file xmlParser.cpp.
References mrpt::system::os::_strnicmp().
Referenced by fromXMLString(), XMLNode::guessCharEncoding(), and myTagCompare().
Definition at line 211 of file xmlParser.cpp.
References XMLSTR.
Referenced by XMLNode::getChildNodeByPath(), and XMLNode::parseClearTag().
const unsigned char base64DecodeTable[] |
Definition at line 2663 of file xmlParser.cpp.
Referenced by XMLParserBase64Tool::decodeSize().
XMLCSTR base64EncodeTable =_CXML("ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/") |
Definition at line 2659 of file xmlParser.cpp.
Referenced by XMLParserBase64Tool::encode().
|
static |
Definition at line 2656 of file xmlParser.cpp.
Referenced by XMLParserBase64Tool::decodeSize(), and XMLParserBase64Tool::encode().
|
static |
Definition at line 30 of file xmlParser.cpp.
Referenced by myWideCharToMultiByte(), XMLNode::setGlobalOptions(), and XMLNode::writeToFile().
|
static |
Definition at line 31 of file xmlParser.cpp.
Referenced by XMLNode::createXMLString(), XMLNode::maybeAddTxT(), XMLNode::openFileHelper(), and XMLNode::setGlobalOptions().
|
static |
Definition at line 31 of file xmlParser.cpp.
Referenced by XMLNode::guessCharEncoding(), XMLNode::openFileHelper(), XMLNode::parseFile(), and XMLNode::setGlobalOptions().
|
static |
Definition at line 31 of file xmlParser.cpp.
Referenced by XMLNode::maybeAddTxT(), XMLNode::openFileHelper(), and XMLNode::setGlobalOptions().
|
static |
Definition at line 470 of file xmlParser.cpp.
Referenced by fromXMLString(), getNextChar(), ToXMLStringTool::lengthXMLString(), XMLNode::parseClearTag(), XMLNode::setGlobalOptions(), and ToXMLStringTool::toXMLUnSafe().
|
static |
Definition at line 430 of file xmlParser.cpp.
Referenced by XMLNode::setGlobalOptions().
|
static |
Definition at line 450 of file xmlParser.cpp.
Referenced by XMLNode::setGlobalOptions().
|
static |
Definition at line 401 of file xmlParser.cpp.
Referenced by XMLNode::setGlobalOptions().
|
static |
Definition at line 410 of file xmlParser.cpp.
Referenced by XMLNode::setGlobalOptions().
|
static |
Definition at line 381 of file xmlParser.cpp.
Referenced by XMLNode::guessCharEncoding(), and XMLNode::setGlobalOptions().
|
static |
Definition at line 41 of file xmlParser.cpp.
Referenced by XMLNode::addClear_priv(), GetNextToken(), XMLNode::maybeAddTxT(), and XMLNode::parseClearTag().
|
static |
Definition at line 56 of file xmlParser.cpp.
Referenced by fromXMLString(), ToXMLStringTool::lengthXMLString(), and ToXMLStringTool::toXMLUnSafe().
Page generated by Doxygen 1.8.14 for MRPT 1.5.9 Git: 690a4699f Wed Apr 15 19:29:53 2020 +0200 at miƩ abr 15 19:30:12 CEST 2020 |