MRPT
1.9.9
|
#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) |
#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 |
using | Attrib = enum Attrib { eAttribName=0, eAttribEquals, eAttribValue } |
using | Status = enum Status { eInsideTag=0, eOutsideTag } |
Enumerations | |
enum | XMLTokenTypeTag { eTokenText = 0, eTokenQuotedText, eTokenTagStart, eTokenTagEnd, eTokenCloseTag, eTokenEquals, eTokenDeclaration, eTokenShortHandClose, eTokenClear, eTokenError } |
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 |
static const char | base64Fillchar |
XMLCSTR | base64EncodeTable |
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 78 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 1419 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 | ) |
Definition at line 1147 of file xmlParser.cpp.
Referenced by GetNextToken(), XMLNode::guessCharEncoding(), XMLNode::maybeAddTxT(), and myTagCompare().
Definition at line 800 of file xmlParser.cpp.
Definition at line 804 of file xmlParser.cpp.
typedef enum XMLTokenTypeTag XMLTokenType |
enum XMLTokenTypeTag |
Enumerator | |
---|---|
eTokenText | |
eTokenQuotedText | |
eTokenTagStart | |
eTokenTagEnd | |
eTokenCloseTag | |
eTokenEquals | |
eTokenDeclaration | |
eTokenShortHandClose | |
eTokenClear | |
eTokenError |
Definition at line 766 of file xmlParser.cpp.
Definition at line 2366 of file xmlParser.cpp.
Referenced by XMLNode::CreateXMLStringR().
|
static |
Definition at line 2191 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 970 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 1168 of file xmlParser.cpp.
References XML::lpXML, XML::nIndex, XML_ByteTable, and XMLCHAR.
Referenced by CountLinesAndColumns(), and GetNextToken().
|
static |
Definition at line 1181 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 37 of file xmlParser.cpp.
Referenced by mrpt::nav::CHolonomicFullEval::evalSingleTarget(), and XMLNode::guessCharEncoding().
Definition at line 1421 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 193 of file xmlParser.cpp.
Referenced by XMLNode::guessCharEncoding(), and XMLNode::parseFile().
Definition at line 1425 of file xmlParser.cpp.
Referenced by XMLNode::addAttribute_priv(), and XMLNode::addToOrder().
Definition at line 1152 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 243 of file xmlParser.cpp.
References XMLNode::char_encoding_UTF8, and characterEncoding.
Referenced by XMLNode::parseFile().
Definition at line 272 of file xmlParser.cpp.
References mrpt::system::os::fopen().
Referenced by XMLNode::openFileHelper(), XMLNode::parseFile(), and XMLNode::writeToFile().
Definition at line 298 of file xmlParser.cpp.
References mrpt::system::os::strcpy(), and XMLSTR.
Referenced by XMLNode::CreateXMLStringR(), and ToXMLStringTool::toXMLUnSafe().
Definition at line 288 of file xmlParser.cpp.
Referenced by XMLNode::getAttribute(), XMLNode::getChildNode(), XMLNode::getChildNodeWithAttribute(), XMLNode::isAttributeSet(), XMLNode::nChildNode(), and XMLNode::parseString().
|
inlinestatic |
Definition at line 276 of file xmlParser.cpp.
Referenced by XMLNode::maybeAddTxT(), myTagCompare(), XMLNode::parseClearTag(), and stringDup().
Definition at line 290 of file xmlParser.cpp.
Referenced by GetNextToken().
Definition at line 284 of file xmlParser.cpp.
References mrpt::system::os::_strnicmp().
Referenced by fromXMLString(), XMLNode::guessCharEncoding(), and myTagCompare().
Definition at line 294 of file xmlParser.cpp.
References XMLSTR.
Referenced by XMLNode::getChildNodeByPath(), and XMLNode::parseClearTag().
const unsigned char base64DecodeTable[] |
Definition at line 3646 of file xmlParser.cpp.
Referenced by XMLParserBase64Tool::decodeSize().
XMLCSTR base64EncodeTable |
Definition at line 3640 of file xmlParser.cpp.
Referenced by XMLParserBase64Tool::encode().
|
static |
Definition at line 3636 of file xmlParser.cpp.
Referenced by XMLParserBase64Tool::decodeSize(), and XMLParserBase64Tool::encode().
|
static |
Definition at line 33 of file xmlParser.cpp.
Referenced by myWideCharToMultiByte(), XMLNode::setGlobalOptions(), and XMLNode::writeToFile().
|
static |
Definition at line 34 of file xmlParser.cpp.
Referenced by XMLNode::createXMLString(), XMLNode::maybeAddTxT(), XMLNode::openFileHelper(), and XMLNode::setGlobalOptions().
|
static |
Definition at line 34 of file xmlParser.cpp.
Referenced by XMLNode::guessCharEncoding(), XMLNode::openFileHelper(), XMLNode::parseFile(), and XMLNode::setGlobalOptions().
|
static |
Definition at line 35 of file xmlParser.cpp.
Referenced by XMLNode::maybeAddTxT(), XMLNode::openFileHelper(), and XMLNode::setGlobalOptions().
|
static |
Definition at line 756 of file xmlParser.cpp.
Referenced by fromXMLString(), getNextChar(), ToXMLStringTool::lengthXMLString(), XMLNode::parseClearTag(), XMLNode::setGlobalOptions(), and ToXMLStringTool::toXMLUnSafe().
|
static |
Definition at line 686 of file xmlParser.cpp.
Referenced by XMLNode::setGlobalOptions().
|
static |
Definition at line 721 of file xmlParser.cpp.
Referenced by XMLNode::setGlobalOptions().
|
static |
Definition at line 639 of file xmlParser.cpp.
Referenced by XMLNode::setGlobalOptions().
|
static |
Definition at line 651 of file xmlParser.cpp.
Referenced by XMLNode::setGlobalOptions().
|
static |
Definition at line 604 of file xmlParser.cpp.
Referenced by XMLNode::guessCharEncoding(), and XMLNode::setGlobalOptions().
|
static |
Definition at line 49 of file xmlParser.cpp.
Referenced by XMLNode::addClear_priv(), GetNextToken(), XMLNode::maybeAddTxT(), and XMLNode::parseClearTag().
|
static |
Definition at line 69 of file xmlParser.cpp.
Referenced by fromXMLString(), ToXMLStringTool::lengthXMLString(), and ToXMLStringTool::toXMLUnSafe().
Page generated by Doxygen 1.8.14 for MRPT 1.9.9 Git: 7d5e6d718 Fri Aug 24 01:51:28 2018 +0200 at lun nov 2 08:35:50 CET 2020 |