SNAP Library 2.0, Developer Reference
2013-05-13 16:33:57
SNAP, a general purpose, high performance system for analysis and manipulation of large networks
|
#include <xml.h>
Public Member Functions | |
void | SkipWs () |
TXmlLx (const PSIn &_SIn, const TXmlSpacing &_Spacing=xspIntact) | |
TXmlLx & | operator= (const TXmlLx &) |
TXmlLxSym | GetSym () |
TStr | GetSymStr () const |
void | EThrow (const TStr &MsgStr) const |
TStr | GetFPosStr () const |
void | ClrArgV () |
void | AddArg (const TStr &ArgNm, const TStr &ArgVal) |
bool | IsArgNm (const TStr &ArgNm) const |
int | GetArgs () const |
void | GetArg (const int &ArgN, TStr &ArgNm, TStr &ArgVal) const |
TStr | GetArgVal (const TStr &ArgNm, const TStr &DfVal=TStr()) const |
bool | IsEntityNm (const TStr &EntityNm, TStr &EntityVal) const |
void | PutEntityVal (const TStr &Nm, const TStr &Val) |
bool | IsPEntityNm (const TStr &EntityNm, TStr &EntityVal) const |
void | PutPEntityVal (const TStr &Nm, const TStr &Val) |
Static Public Member Functions | |
static char | GetArgValQCh (const TStr &ArgVal) |
static TStr | GetXmlLxSymStr (const TXmlLxSym &XmlLxSym) |
static bool | IsTagNm (const TStr &Str) |
static TStr | GetXmlStrFromPlainMem (const TMem &PlainMem) |
static TStr | GetXmlStrFromPlainStr (const TChA &PlainChA) |
static TStr | GetPlainStrFromXmlStr (const TStr &XmlStr) |
static TStr | GetUsAsciiStrFromXmlStr (const TStr &EntRefStr) |
static TStr | GetChRefFromYuEntRef (const TStr &YuEntRefStr) |
Public Attributes | |
TXmlLxSym | Sym |
TChA | TxtChA |
TStr | TagNm |
TStrKdV | ArgNmValKdV |
Private Member Functions | |
uchar | GetCh () |
void | PutCh (const uchar &_Ch) |
void | PutStr (const TStr &Str) |
void | ToNrSpacing () |
void | GetWs (const bool &IsRq) |
TStr | GetReference () |
void | GetEq () |
TStr | GetName () |
TStr | GetName (const TStr &RqNm) |
void | GetComment () |
TStr | GetAttValue () |
TStr | GetVersionNum () |
TStr | GetEncName () |
TStr | GetStalVal () |
void | GetXmlDecl () |
void | GetPI () |
TStr | GetSystemLiteral () |
TStr | GetPubidLiteral () |
TStr | GetPEReference () |
void | GetExternalId () |
void | GetNData () |
void | GetDocTypeDecl () |
void | GetElement () |
void | GetAttList () |
TStr | GetEntityValue () |
void | GetEntity () |
void | GetNotation () |
void | GetCDSect () |
Private Attributes | |
PSIn | SIn |
TSIn & | RSIn |
TChA | ChStack |
uchar | PrevCh |
uchar | Ch |
int | LnN |
int | LnChN |
int | ChN |
TXmlSpacing | Spacing |
TStrStrH | EntityNmToValH |
TStrStrH | PEntityNmToValH |
Static Private Attributes | |
static TXmlChDef | ChDef |
TXmlLx::TXmlLx | ( | const PSIn & | _SIn, |
const TXmlSpacing & | _Spacing = xspIntact |
||
) | [inline] |
Definition at line 145 of file xml.h.
References GetCh().
: SIn(_SIn), RSIn(*SIn), ChStack(), PrevCh(' '), Ch(' '), LnN(1), LnChN(0), ChN(0), Spacing(_Spacing), EntityNmToValH(100), PEntityNmToValH(100), Sym(xsyUndef), TxtChA(), TagNm(), ArgNmValKdV(10){GetCh();}
void TXmlLx::AddArg | ( | const TStr & | ArgNm, |
const TStr & | ArgVal | ||
) | [inline] |
Definition at line 161 of file xml.h.
References TVec< TVal, TSizeTy >::Add(), and ArgNmValKdV.
Referenced by GetSym(), and GetXmlDecl().
{ ArgNmValKdV.Add(TStrKd(ArgNm, ArgVal));}
void TXmlLx::ClrArgV | ( | ) | [inline] |
Definition at line 160 of file xml.h.
References ArgNmValKdV, and TVec< TVal, TSizeTy >::Clr().
Referenced by GetSym().
{ArgNmValKdV.Clr();}
void TXmlLx::EThrow | ( | const TStr & | MsgStr | ) | const |
Definition at line 885 of file xml.cpp.
References TSBase::GetSNm(), TInt::GetStr(), LnChN, LnN, SIn, and TExcept::Throw().
Referenced by GetAttList(), GetAttValue(), GetCDSect(), GetComment(), GetDocTypeDecl(), GetElement(), GetEncName(), GetEntity(), GetEntityValue(), GetEq(), GetExternalId(), GetName(), GetNotation(), GetPEReference(), GetPI(), GetPubidLiteral(), GetReference(), GetStalVal(), GetSym(), GetSystemLiteral(), GetVersionNum(), GetWs(), GetXmlDecl(), and TXmlDoc::LoadTxtElement().
{ TChA FPosChA; FPosChA+=" [File:"; FPosChA+=SIn->GetSNm(); FPosChA+=" Line:"; FPosChA+=TInt::GetStr(LnN); FPosChA+=" Char:"; FPosChA+=TInt::GetStr(LnChN); FPosChA+="]"; TStr FullMsgStr=MsgStr+FPosChA; TExcept::Throw(FullMsgStr); }
void TXmlLx::GetArg | ( | const int & | ArgN, |
TStr & | ArgNm, | ||
TStr & | ArgVal | ||
) | const [inline] |
Definition at line 166 of file xml.h.
References ArgNmValKdV.
Referenced by GetSymStr(), TSnap::LoadDyNet(), and TSnap::LoadDyNetGraphV().
{ ArgNm=ArgNmValKdV[ArgN].Key; ArgVal=ArgNmValKdV[ArgN].Dat;}
int TXmlLx::GetArgs | ( | ) | const [inline] |
Definition at line 165 of file xml.h.
References ArgNmValKdV, and TVec< TVal, TSizeTy >::Len().
Referenced by GetSymStr().
{return ArgNmValKdV.Len();}
TStr TXmlLx::GetArgVal | ( | const TStr & | ArgNm, |
const TStr & | DfVal = TStr() |
||
) | const [inline] |
Definition at line 168 of file xml.h.
References ArgNmValKdV, and TVec< TVal, TSizeTy >::SearchForw().
{ int ArgN=ArgNmValKdV.SearchForw(TStrKd(ArgNm)); if (ArgN==-1){return DfVal;} else {return ArgNmValKdV[ArgN].Dat;}}
static char TXmlLx::GetArgValQCh | ( | const TStr & | ArgVal | ) | [inline, static] |
Definition at line 171 of file xml.h.
References TStr::IsChIn().
Referenced by TXmlTok::AddTokToChA(), and GetSymStr().
{ if (ArgVal.IsChIn('\"')){return '\'';} else {return '\"';}}
void TXmlLx::GetAttList | ( | ) | [private] |
Definition at line 665 of file xml.cpp.
References Ch, ChDef, TChA::Clr(), EThrow(), GetCh(), TXmlChDef::IsChar(), and TxtChA.
Referenced by GetSym().
{ TxtChA.Clr(); while (Ch!='>'){ if (!ChDef.IsChar(Ch)){EThrow("Invalid Element character.");} TxtChA+=Ch; GetCh(); } GetCh(); }
TStr TXmlLx::GetAttValue | ( | ) | [private] |
Definition at line 457 of file xml.cpp.
References Ch, ChDef, EThrow(), forever, GetCh(), GetReference(), and TXmlChDef::IsChar().
Referenced by GetSym().
{ // [10] AttValue ::= '"' ([^<&"] | Reference)* '"' // | "'" ([^<&'] | Reference)* "'" uchar QCh=Ch; if ((QCh!='"')&&(QCh!='\'')){EThrow("Invalid attribute-value start.");} TChA ValChA; GetCh(); forever { if ((Ch=='<')||(!ChDef.IsChar(Ch))){ EThrow("Invalid attribute-value character.");} if (Ch==QCh){GetCh(); break;} // final quote else if (Ch=='&'){GetCh(); ValChA+=GetReference();} // reference else {ValChA+=Ch; GetCh();} // usual char } return ValChA; }
void TXmlLx::GetCDSect | ( | ) | [private] |
Definition at line 733 of file xml.cpp.
References Ch, ChDef, TChA::Clr(), EThrow(), forever, GetCh(), TXmlChDef::IsChar(), TChA::LastCh(), TChA::LastLastCh(), TChA::Len(), TChA::Pop(), and TxtChA.
Referenced by GetSym().
{ // [18] CDSect ::= CDStart CData CDEnd // [19] CDStart ::= '<![CDATA{{['}} // [20] CData ::= (Char* - (Char* ']]>' Char*)) // [21] CDEnd ::= ']]>' if (Ch=='['){GetCh();} else {EThrow("Invalid start of CDATA section.");} TxtChA.Clr(); forever { if (!ChDef.IsChar(Ch)){EThrow("Invalid CDATA character.");} if ((Ch=='>')&&(TxtChA.Len()>=2)&& (TxtChA.LastLastCh()==']') && (TxtChA.LastCh()==']')){ GetCh(); TxtChA.Pop(); TxtChA.Pop(); break; } else { TxtChA+=Ch; GetCh(); } } }
uchar TXmlLx::GetCh | ( | ) | [private] |
Definition at line 260 of file xml.cpp.
References Ch, ChN, ChStack, EAssert, TChA::Empty(), TSIn::Eof(), TCh::EofCh, TSIn::GetCh(), TCh::LfCh, LnChN, LnN, TChA::Pop(), PrevCh, and RSIn.
Referenced by GetAttList(), GetAttValue(), GetCDSect(), GetComment(), GetDocTypeDecl(), GetElement(), GetEncName(), GetEntity(), GetEntityValue(), GetEq(), GetName(), GetNotation(), GetPEReference(), GetPI(), GetPubidLiteral(), GetReference(), GetStalVal(), GetSym(), GetSystemLiteral(), GetVersionNum(), GetWs(), GetXmlDecl(), SkipWs(), and TXmlLx().
{ EAssert(Ch!=TCh::EofCh); PrevCh=Ch; if (ChStack.Empty()){Ch=(RSIn.Eof()) ? TCh::EofCh : RSIn.GetCh();} else {Ch=ChStack.Pop();} ChN++; if (Ch==TCh::LfCh){LnN++; LnChN=0;} else {LnChN++;} //putchar(Ch); return Ch; }
TStr TXmlLx::GetChRefFromYuEntRef | ( | const TStr & | YuEntRefStr | ) | [static] |
Definition at line 1072 of file xml.cpp.
References TStr::ChangeStrAll().
{ TStr ChRefStr=YuEntRefStr; ChRefStr.ChangeStrAll("&ch;", "è"); ChRefStr.ChangeStrAll("&Ch;", "È"); ChRefStr.ChangeStrAll("&sh;", "š"); ChRefStr.ChangeStrAll("&Sh;", "Š"); ChRefStr.ChangeStrAll("&zh;", "ž"); ChRefStr.ChangeStrAll("&Zh;", "Ž"); ChRefStr.ChangeStrAll("&cs", "c"); ChRefStr.ChangeStrAll("&Cs;", "C"); ChRefStr.ChangeStrAll("&dz;", "dz"); ChRefStr.ChangeStrAll("&Dz;", "Dz"); return ChRefStr; }
void TXmlLx::GetComment | ( | ) | [private] |
Definition at line 436 of file xml.cpp.
References Ch, ChDef, TChA::Clr(), EThrow(), forever, GetCh(), TXmlChDef::IsChar(), and TxtChA.
Referenced by GetSym().
{ // [15] Comment ::= {{'<!-}}-' ((Char - '-') | ('-' (Char - '-')))* '-->' if (GetCh()!='-'){EThrow("Invalid comment start.");} TxtChA.Clr(); forever { GetCh(); if (!ChDef.IsChar(Ch)){EThrow("Invalid comment character.");} if (Ch=='-'){ if (GetCh()=='-'){ if (GetCh()=='>'){GetCh(); break;} // final bracket else {EThrow("Invalid comment end.");} } else { if (!ChDef.IsChar(Ch)){EThrow("Invalid comment character.");} TxtChA+='-'; TxtChA+=Ch; // special case if single '-' } } else { TxtChA+=Ch; // usual char } } }
void TXmlLx::GetDocTypeDecl | ( | ) | [private] |
Definition at line 627 of file xml.cpp.
References Ch, ChDef, EThrow(), GetCh(), GetExternalId(), GetName(), GetPEReference(), GetSym(), GetWs(), TXmlChDef::IsWs(), and TagNm.
Referenced by GetSym().
{ // [28] doctypedecl ::= {{'<!DOCTYPE'}} S Name (S ExternalID)? S? // ('[' (markupdecl | PEReference | S)* ']' S?)? '>' GetWs(true); TStr DocTypeDeclNm=GetName(); GetWs(false); if (Ch=='>'){GetCh(); return;} if (Ch!='['){GetExternalId();} GetWs(false); if (Ch=='['){ GetCh(); // [28] (markupdecl | PEReference | S)* GetWs(false); while (Ch!=']'){ if (ChDef.IsWs(Ch)){GetWs(true);} else if (Ch=='%'){GetPEReference();} else { GetSym(); } } GetCh(); } GetWs(false); // '>' if (Ch=='>'){GetCh();} else {EThrow("Invalid end-of-tag in document-type-declaration.");} TagNm=DocTypeDeclNm; }
void TXmlLx::GetElement | ( | ) | [private] |
Definition at line 656 of file xml.cpp.
References Ch, ChDef, TChA::Clr(), EThrow(), GetCh(), TXmlChDef::IsChar(), and TxtChA.
Referenced by GetSym().
{ TxtChA.Clr(); while (Ch!='>'){ if (!ChDef.IsChar(Ch)){EThrow("Invalid Element character.");} TxtChA+=Ch; GetCh(); } GetCh(); }
TStr TXmlLx::GetEncName | ( | ) | [private] |
Definition at line 493 of file xml.cpp.
References Ch, EThrow(), and GetCh().
Referenced by GetXmlDecl().
{ // [80] EncodingDecl ::= {{S 'encoding' Eq}} ('"' EncName '"' | "'" EncName "'" ) // [81] EncName ::= [A-Za-z] ([A-Za-z0-9._] | '-')* char QCh=Ch; if ((Ch!='\'')&&(Ch!='"')){EThrow("Quote character (' or \") expected.");} TChA EncNmChA; GetCh(); if ((('a'<=Ch)&&(Ch<='z'))||(('A'<=Ch)&&(Ch<='Z'))){EncNmChA+=Ch;} else {EThrow("Invalid encoding-name character.");} GetCh(); while (Ch!=QCh){ if ((('a'<=Ch)&&(Ch<='z'))||(('A'<=Ch)&&(Ch<='Z'))|| (('0'<=Ch)&&(Ch<='9'))||(Ch=='.')||(Ch=='_')||(Ch=='-')){EncNmChA+=Ch;} else {EThrow("Invalid version-number character.");} GetCh(); } GetCh(); return EncNmChA; }
void TXmlLx::GetEntity | ( | ) | [private] |
Definition at line 690 of file xml.cpp.
References Ch, EThrow(), GetCh(), GetEntityValue(), GetExternalId(), GetName(), GetNData(), GetWs(), PutEntityVal(), PutPEntityVal(), and TagNm.
Referenced by GetSym().
{ // [70] EntityDecl ::= GEDecl | PEDecl // [71] GEDecl ::= '<!ENTITY' S Name S EntityDef S? '>' // [72] PEDecl ::= '<!ENTITY' S '%' S Name S PEDef S? '>' GetWs(true); TStr EntityNm; if (Ch=='%'){ GetCh(); GetWs(true); EntityNm=GetName(); GetWs(true); // [74] PEDef ::= EntityValue | ExternalID if ((Ch=='\"')||(Ch=='\'')){ TStr EntityVal=GetEntityValue(); PutPEntityVal(EntityNm, EntityVal); } else { GetExternalId(); GetWs(false); if (Ch!='>'){GetNData();} } } else { EntityNm=GetName(); GetWs(true); // [73] EntityDef ::= EntityValue | (ExternalID NDataDecl?) if ((Ch=='\"')||(Ch=='\'')){ TStr EntityVal=GetEntityValue(); PutEntityVal(EntityNm, EntityVal); } else { GetExternalId(); } } GetWs(false); if (Ch=='>'){GetCh();} else {EThrow("Invalid end-of-tag in entity-declaration.");} TagNm=EntityNm; }
TStr TXmlLx::GetEntityValue | ( | ) | [private] |
Definition at line 674 of file xml.cpp.
References Ch, ChDef, EThrow(), forever, GetCh(), GetPEReference(), GetReference(), and TXmlChDef::IsChar().
Referenced by GetEntity().
{ // [9] EntityValue ::= '"' ([^%&"] | PEReference | Reference)* '"' // | "'" ([^%&'] | PEReference | Reference)* "'" uchar QCh=Ch; if ((QCh!='"')&&(QCh!='\'')){EThrow("Invalid entity-value start.");} TChA ValChA; GetCh(); forever { if (!ChDef.IsChar(Ch)){EThrow("Invalid entity-value character.");} if (Ch==QCh){GetCh(); break;} // final quote else if (Ch=='&'){GetCh(); ValChA+=GetReference();} // reference else if (Ch=='%'){GetCh(); ValChA+=GetPEReference();} // pereference else {ValChA+=Ch; GetCh();} // usual char } return ValChA; }
void TXmlLx::GetEq | ( | ) | [private] |
Definition at line 408 of file xml.cpp.
References Ch, EThrow(), GetCh(), and GetWs().
Referenced by GetSym(), and GetXmlDecl().
{ // [25] Eq ::= S? '=' S? GetWs(false); if (Ch=='='){GetCh();} else {EThrow("Equality ('=') character expected.");} GetWs(false); }
void TXmlLx::GetExternalId | ( | ) | [private] |
Definition at line 609 of file xml.cpp.
References EThrow(), GetName(), GetPubidLiteral(), GetSystemLiteral(), and GetWs().
Referenced by GetDocTypeDecl(), and GetEntity().
{ // ExternalID ::= 'SYSTEM' S SystemLiteral // | 'PUBLIC' S PubidLiteral S SystemLiteral TStr ExtIdNm=GetName(); if (ExtIdNm=="SYSTEM"){ GetWs(true); GetSystemLiteral(); } else if (ExtIdNm=="PUBLIC"){ GetWs(true); GetPubidLiteral(); GetWs(true); GetSystemLiteral(); } else { EThrow("Invalid external-id ('SYSTEM' or 'PUBLIC' expected)."); } }
TStr TXmlLx::GetFPosStr | ( | ) | const |
Definition at line 895 of file xml.cpp.
References TSBase::GetSNm(), TInt::GetStr(), LnChN, LnN, and SIn.
{ TChA FPosChA; FPosChA+=" [File:"; FPosChA+=SIn->GetSNm(); FPosChA+=" Line:"; FPosChA+=TInt::GetStr(LnN); FPosChA+=" Char:"; FPosChA+=TInt::GetStr(LnChN); FPosChA+="]"; return FPosChA; }
TStr TXmlLx::GetName | ( | ) | [private] |
Definition at line 416 of file xml.cpp.
References Ch, ChDef, EThrow(), GetCh(), TXmlChDef::IsFirstNameCh(), and TXmlChDef::IsName().
Referenced by GetDocTypeDecl(), GetEntity(), GetExternalId(), GetName(), GetNData(), GetPEReference(), GetReference(), GetSym(), and GetXmlDecl().
{ // [5] Name ::= (Letter | '_' | ':') (NameChar)* TChA NmChA; if (ChDef.IsFirstNameCh(Ch)){ do {NmChA+=Ch;} while (ChDef.IsName(GetCh())); } else { EThrow("Invalid first name character."); // EThrow(TStr::Fmt("Invalid first name character [%u:'%c%c%c%c%c'].", // uint(Ch), Ch, RSIn.GetCh(), RSIn.GetCh(), RSIn.GetCh(), RSIn.GetCh())); } return NmChA; }
TStr TXmlLx::GetName | ( | const TStr & | RqNm | ) | [private] |
void TXmlLx::GetNData | ( | ) | [private] |
void TXmlLx::GetNotation | ( | ) | [private] |
Definition at line 722 of file xml.cpp.
References Ch, ChDef, TChA::Clr(), EThrow(), GetCh(), TXmlChDef::IsChar(), and TxtChA.
Referenced by GetSym().
{ // [82] NotationDecl ::= '<!NOTATION' S Name S (ExternalID | PublicID) S? '>' // [83] PublicID ::= 'PUBLIC' S PubidLiteral TxtChA.Clr(); while (Ch!='>'){ if (!ChDef.IsChar(Ch)){EThrow("Invalid Element character.");} TxtChA+=Ch; GetCh(); } GetCh(); }
TStr TXmlLx::GetPEReference | ( | ) | [private] |
Definition at line 397 of file xml.cpp.
References Ch, TStr::Empty(), EThrow(), GetCh(), GetName(), and IsPEntityNm().
Referenced by GetDocTypeDecl(), and GetEntityValue().
{ // [69] PEReference ::= '%' Name ';' TStr EntityNm=GetName(); if ((EntityNm.Empty())||(Ch!=';')){EThrow("Invalid PEntity-Reference.");} GetCh(); TStr EntityVal; if (IsPEntityNm(EntityNm, EntityVal)){/*intentionaly empty*/} else {EThrow(TStr("PEntity-Reference (")+EntityNm+") does not exist.");} return EntityVal; }
void TXmlLx::GetPI | ( | ) | [private] |
Definition at line 562 of file xml.cpp.
References Ch, ChDef, TChA::Clr(), EThrow(), forever, GetCh(), GetWs(), TXmlChDef::IsChar(), and TxtChA.
Referenced by GetSym().
{ // [16] PI ::= {{'<?' PITarget}} (S (Char* - (Char* '?>' Char*)))? '?>' // [17] PITarget ::= Name - (('X' | 'x') ('M' | 'm') ('L' | 'l')) GetWs(false); TxtChA.Clr(); forever { if (!ChDef.IsChar(Ch)){EThrow("Invalid PI character.");} if (Ch=='?'){ if (GetCh()=='>'){ GetCh(); break; } else { if (!ChDef.IsChar(Ch)){EThrow("Invalid PI character.");} TxtChA+='?'; TxtChA+=Ch; // special case if single '?' } } else { TxtChA+=Ch; // usual char } GetCh(); } }
TStr TXmlLx::GetPlainStrFromXmlStr | ( | const TStr & | XmlStr | ) | [static] |
Definition at line 991 of file xml.cpp.
References Ch, TChA::Empty(), TUnicode::EncodeUtf8(), TChRet::Eof(), forever, TChRet::GetCh(), TCh::GetHex(), TCh::GetNum(), TCh::IsHex(), TCh::IsNum(), and TStrIn::New().
Referenced by GetUsAsciiStrFromXmlStr().
{ TChA PlainChA; TChRet Ch(TStrIn::New(XmlStr)); Ch.GetCh(); while (!Ch.Eof()){ if (Ch()!='&'){ PlainChA+=Ch(); Ch.GetCh(); } else { // [67] Reference ::= EntityRef | CharRef if (Ch.GetCh()=='#'){ // [66] CharRef ::= '&#' [0-9]+ ';' | '&#x' [0-9a-fA-F]+ ';' TChA RefChA; int RefCd=0; if (Ch.GetCh()=='x'){ // hex-decimal character code forever { Ch.GetCh(); if (TCh::IsHex(Ch())){ RefChA+=Ch(); RefCd=RefCd*16+TCh::GetHex(Ch()); } else { break; } } } else { // decimal character code forever { if (TCh::IsNum(Ch())){ RefChA+=Ch(); RefCd=RefCd*10+TCh::GetNum(Ch()); } else { break; } Ch.GetCh(); } } if ((!RefChA.Empty())&&(Ch()==';')){ Ch.GetCh(); if (RefCd < 0x80) { // ascii character uchar RefCh=uchar(RefCd); PlainChA+=RefCh; } else { // unicode TUnicode::EncodeUtf8(RefCd, PlainChA); } } } else { // [68] EntityRef ::= '&' Name ';' TChA EntityNm; while ((!Ch.Eof())&&(Ch()!=';')){ EntityNm+=Ch(); Ch.GetCh();} if ((!EntityNm.Empty())&&(Ch()==';')){ Ch.GetCh(); if (EntityNm=="quot"){PlainChA+='"';} else if (EntityNm=="amp"){PlainChA+='&';} else if (EntityNm=="apos"){PlainChA+='\'';} else if (EntityNm=="lt"){PlainChA+='<';} else if (EntityNm=="gt"){PlainChA+='>';} } } } } return PlainChA; }
TStr TXmlLx::GetPubidLiteral | ( | ) | [private] |
Definition at line 596 of file xml.cpp.
References Ch, ChDef, EThrow(), GetCh(), and TXmlChDef::IsPubid().
Referenced by GetExternalId().
{ // [12] PubidLiteral ::= '"' PubidChar* '"' | "'" (PubidChar - "'")* "'" char QCh=Ch; if ((Ch!='\'')&&(Ch!='"')){EThrow("Quote character (' or \") expected.");} TChA LitChA; GetCh(); while (Ch!=QCh){ if (!ChDef.IsPubid(Ch)){EThrow("Invalid Public-Id-Literal character.");} LitChA+=Ch; GetCh(); } GetCh(); return LitChA; }
TStr TXmlLx::GetReference | ( | ) | [private] |
Definition at line 340 of file xml.cpp.
References Ch, ChDef, TChA::Empty(), TStr::Empty(), TUnicode::EncodeUtf8(), EThrow(), Fail, forever, GetCh(), TCh::GetHex(), GetName(), TCh::GetNum(), TXmlChDef::IsEntityNm(), IsEntityNm(), TCh::IsHex(), and TCh::IsNum().
Referenced by GetAttValue(), GetEntityValue(), and GetSym().
{ // [67] Reference ::= EntityRef | CharRef if (Ch=='#'){ // [66] CharRef ::= '&#' [0-9]+ ';' | '&#x' [0-9a-fA-F]+ ';' TChA RefChA; int RefCd=0; if (GetCh()=='x'){ // hex-decimal character code forever { GetCh(); if (TCh::IsHex(Ch)){ RefChA+=Ch; RefCd=RefCd*16+TCh::GetHex(Ch); } else { break; } } } else { // decimal character code forever { if (TCh::IsNum(Ch)){ RefChA+=Ch; RefCd=RefCd*10+TCh::GetNum(Ch); } else { break; } GetCh(); } } if ((!RefChA.Empty())&&(Ch==';')){ GetCh(); if (RefCd < 0x80) { // 8-bit char uchar RefCh=uchar(RefCd); return TStr(RefCh); } else { TStr ResStr = TUnicode::EncodeUtf8(RefCd); return ResStr; } } else { EThrow("Invalid Char-Reference."); Fail; return TStr(); } } else { // [68] EntityRef ::= '&' Name ';' TStr EntityNm=GetName(); if ((!EntityNm.Empty())&&(Ch==';')){ GetCh(); TStr EntityVal; if (IsEntityNm(EntityNm, EntityVal)){/*intentionaly empty*/} else if (ChDef.IsEntityNm(EntityNm, EntityVal)){/*intentionaly empty*/} else {EThrow(TStr("Entity-Reference (")+EntityNm+") does not exist.");} return EntityVal; } else { EThrow("Invalid Entity-Reference."); Fail; return TStr(); } } }
TStr TXmlLx::GetStalVal | ( | ) | [private] |
Definition at line 513 of file xml.cpp.
References Ch, EThrow(), Fail, and GetCh().
Referenced by GetXmlDecl().
{ // [32] SDDecl ::= {{S 'standalone' Eq}} // (("'" ('yes' | 'no') "'") | ('"' ('yes' | 'no') '"')) char QCh=Ch; if ((Ch!='\'')&&(Ch!='"')){EThrow("Quote character (' or \") expected.");} TChA StalChA; GetCh(); while (Ch!=QCh){ if (('a'<=Ch)&&(Ch<='z')){StalChA+=Ch;} else {EThrow("Invalid standalone-value character.");} GetCh(); } GetCh(); TStr StalVal=StalChA; if ((StalVal=="yes")||(StalVal=="no")){return StalVal;} else {EThrow("Invalid standalone-value."); Fail; return TStr();} }
Definition at line 757 of file xml.cpp.
References AddArg(), Ch, ChDef, TChA::Clr(), ClrArgV(), TCh::EofCh, EThrow(), forever, GetAttList(), GetAttValue(), GetCDSect(), GetCh(), GetComment(), GetDocTypeDecl(), GetElement(), GetEntity(), GetEq(), TStr::GetLc(), GetName(), GetNotation(), GetPI(), GetReference(), TUInt::GetStr(), GetWs(), GetXmlDecl(), TXmlChDef::IsChar(), TXmlChDef::IsWs(), TChA::LastCh(), TChA::LastLastCh(), TChA::Len(), SkipWs(), Spacing, Sym, TagNm, ToNrSpacing(), TxtChA, xspTruncate, xsyAttList, xsyComment, xsyDocTypeDecl, xsyElement, xsyEntity, xsyEof, xsyETag, xsyNotation, xsyPI, xsyQStr, xsySETag, xsySTag, xsyStr, xsyWs, and xsyXmlDecl.
Referenced by GetDocTypeDecl(), TStrUtil::GetXmlTagNmVal(), TStrUtil::GetXmlTagNmVal2(), TStrUtil::GetXmlTagVal(), TSnap::LoadDyNet(), TSnap::LoadDyNetGraphV(), TXmlDoc::LoadTxt(), TXmlDoc::LoadTxtElement(), TXmlDoc::LoadTxtMiscStar(), and TXmlDoc::SkipTopTag().
{ if (Ch=='<'){ GetCh(); ClrArgV(); if (Ch=='?'){ GetCh(); TagNm=GetName(); if (TagNm.GetLc()=="xml"){Sym=xsyXmlDecl; GetXmlDecl();} else {Sym=xsyPI; GetPI();} } else if (Ch=='!'){ GetCh(); if (Ch=='['){ GetCh(); TagNm=GetName(); if (TagNm=="CDATA"){Sym=xsyQStr; GetCDSect();} else {EThrow(TStr("Invalid tag after '<![' (")+TagNm+").");} } else if (Ch=='-'){ Sym=xsyComment; GetComment(); } else { TagNm=GetName(); if (TagNm=="DOCTYPE"){GetDocTypeDecl(); Sym=xsyDocTypeDecl;} else if (TagNm=="ELEMENT"){GetElement(); Sym=xsyElement;} else if (TagNm=="ATTLIST"){GetAttList(); Sym=xsyAttList;} else if (TagNm=="ENTITY"){GetEntity(); Sym=xsyEntity;} else if (TagNm=="NOTATION"){GetNotation(); Sym=xsyNotation;} else {EThrow(TStr("Invalid tag (")+TagNm+").");} } } else if (Ch=='/'){ // xsyETag GetCh(); Sym=xsyETag; TagNm=GetName(); GetWs(false); if (Ch=='>'){GetCh();} else {EThrow("Invalid End-Tag.");} } else { // xsySTag or xsySETag TagNm=GetName(); GetWs(false); while ((Ch!='>')&&(Ch!='/')){ TStr AttrNm=GetName(); GetEq(); TStr AttrVal=GetAttValue(); GetWs(false); AddArg(AttrNm, AttrVal); } if (Ch=='/'){ if (GetCh()=='>'){Sym=xsySETag; GetCh();} else {EThrow("Invalid Empty-Element-Tag.");} } else { Sym=xsySTag; GetCh(); } } if (Spacing==xspTruncate){SkipWs();} } else if (ChDef.IsWs(Ch)){ Sym=xsyWs; GetWs(true); ToNrSpacing(); if (Spacing==xspTruncate){GetSym();} } else if (Ch==TCh::EofCh){ Sym=xsyEof; } else { Sym=xsyStr; TxtChA.Clr(); // [14] CharData ::= [^<&]* - ([^<&]* ']]>' [^<&]*) forever { if (!ChDef.IsChar(Ch)){ EThrow(TUInt::GetStr(Ch, "Invalid character (%d)."));} // GetCh(); continue; // skip invalid characters if (Ch=='<'){break;} // tag if (Ch=='&'){GetCh(); TxtChA+=GetReference();} // reference else { if ((Ch=='>')&&(TxtChA.Len()>=2)&& (TxtChA.LastLastCh()==']')&&(TxtChA.LastCh()==']')){ EThrow("Forbidden substring ']]>' in character data.");} TxtChA+=Ch; GetCh(); // usual char } } ToNrSpacing(); } return Sym; }
TStr TXmlLx::GetSymStr | ( | ) | const |
Definition at line 835 of file xml.cpp.
References TChA::Empty(), Fail, GetArg(), GetArgs(), GetArgValQCh(), TStr::GetHex(), Sym, TagNm, TxtChA, xsyComment, xsyDocTypeDecl, xsyEof, xsyETag, xsyPI, xsyQStr, xsySETag, xsySTag, xsyStr, xsyUndef, xsyWs, and xsyXmlDecl.
{ TChA SymChA; switch (Sym){ case xsyUndef: SymChA="{Undef}"; break; case xsyWs: SymChA+="{Space:'"; SymChA+=TStr(TxtChA).GetHex(); SymChA+="'}"; break; case xsyComment: SymChA+="<!--"; SymChA+=TxtChA; SymChA+="-->"; break; case xsyXmlDecl:{ SymChA+="<?"; SymChA+=TagNm; for (int ArgN=0; ArgN<GetArgs(); ArgN++){ TStr ArgNm; TStr ArgVal; GetArg(ArgN, ArgNm, ArgVal); char ArgValQCh=GetArgValQCh(ArgVal); SymChA+=' '; SymChA+=ArgNm; SymChA+='='; SymChA+=ArgValQCh; SymChA+=ArgVal; SymChA+=ArgValQCh; } SymChA+="?>"; break;} case xsyPI: SymChA+="<?"; SymChA+=TagNm; if (!TxtChA.Empty()){SymChA+=' '; SymChA+=TxtChA;} SymChA+="?>"; break; case xsyDocTypeDecl: SymChA+="<!DOCTYPE "; SymChA+=TagNm; SymChA+=">"; break; case xsySTag: case xsySETag:{ SymChA+="<"; SymChA+=TagNm; for (int ArgN=0; ArgN<GetArgs(); ArgN++){ TStr ArgNm; TStr ArgVal; GetArg(ArgN, ArgNm, ArgVal); char ArgValQCh=GetArgValQCh(ArgVal); SymChA+=' '; SymChA+=ArgNm; SymChA+='='; SymChA+=ArgValQCh; SymChA+=ArgVal; SymChA+=ArgValQCh; } if (Sym==xsySTag){SymChA+=">";} else if (Sym==xsySETag){SymChA+="/>";} else {Fail;} break;} case xsyETag: SymChA+="</"; SymChA+=TagNm; SymChA+=">"; break; case xsyStr: SymChA="{String:'"; SymChA+=TxtChA; SymChA+="'}"; break; case xsyQStr: SymChA="{QString:'"; SymChA+=TxtChA; SymChA+="'}"; break; case xsyEof: SymChA="{Eof}"; break; default: Fail; } return SymChA; }
TStr TXmlLx::GetSystemLiteral | ( | ) | [private] |
Definition at line 583 of file xml.cpp.
References Ch, ChDef, EThrow(), GetCh(), and TXmlChDef::IsChar().
Referenced by GetExternalId().
{ // [11] SystemLiteral ::= ('"' [^"]* '"') | ("'" [^']* "'") char QCh=Ch; if ((Ch!='\'')&&(Ch!='"')){EThrow("Quote character (' or \") expected.");} TChA LitChA; GetCh(); while (Ch!=QCh){ if (!ChDef.IsChar(Ch)){EThrow("Invalid System-Literal character.");} LitChA+=Ch; GetCh(); } GetCh(); return LitChA; }
TStr TXmlLx::GetUsAsciiStrFromXmlStr | ( | const TStr & | EntRefStr | ) | [static] |
Definition at line 1056 of file xml.cpp.
References Ch, TStr::ChangeStrAll(), ChN, GetPlainStrFromXmlStr(), TChA::Len(), and TChA::PutCh().
{ TStr UsAsciiStr=XmlStr; UsAsciiStr.ChangeStrAll("è", "c"); UsAsciiStr.ChangeStrAll("È", "C"); UsAsciiStr.ChangeStrAll("š", "s"); UsAsciiStr.ChangeStrAll("Š", "S"); UsAsciiStr.ChangeStrAll("ž", "z"); UsAsciiStr.ChangeStrAll("Ž", "Z"); TChA UsAsciiChA=TXmlLx::GetPlainStrFromXmlStr(UsAsciiStr); for (int ChN=0; ChN<UsAsciiChA.Len(); ChN++){ char Ch=UsAsciiChA[ChN]; if ((Ch<' ')||('~'<Ch)){UsAsciiChA.PutCh(ChN, 'x');} } return UsAsciiChA; }
TStr TXmlLx::GetVersionNum | ( | ) | [private] |
Definition at line 473 of file xml.cpp.
References Ch, EThrow(), and GetCh().
Referenced by GetXmlDecl().
{ // [24] VersionInfo ::= {{S 'version' Eq}} (' VersionNum ' | " VersionNum ") // [26] VersionNum ::= ([a-zA-Z0-9_.:] | '-')+ char QCh=Ch; if ((Ch!='\'')&&(Ch!='"')){EThrow("Quote character (' or \") expected.");} TChA VerNumChA; GetCh(); do { if ((('a'<=Ch)&&(Ch<='z'))||(('A'<=Ch)&&(Ch<='Z'))|| (('0'<=Ch)&&(Ch<='9'))||(Ch=='_')||(Ch=='.')||(Ch==':')||(Ch=='-')){ VerNumChA+=Ch; } else { EThrow("Invalid version-number character."); } GetCh(); } while (Ch!=QCh); GetCh(); return VerNumChA; }
void TXmlLx::GetWs | ( | const bool & | IsRq | ) | [private] |
Definition at line 331 of file xml.cpp.
References Ch, ChDef, TChA::Clr(), EThrow(), GetCh(), TXmlChDef::IsWs(), and TxtChA.
Referenced by GetDocTypeDecl(), GetEntity(), GetEq(), GetExternalId(), GetNData(), GetPI(), GetSym(), and GetXmlDecl().
{ // [3] S ::= (#x20 | #x9 | #xD | #xA)+ int WSpaces=0; TxtChA.Clr(); while (ChDef.IsWs(Ch)){ WSpaces++; TxtChA+=Ch; GetCh();} if (IsRq&&(WSpaces==0)){ EThrow("White-space required.");} }
void TXmlLx::GetXmlDecl | ( | ) | [private] |
Definition at line 531 of file xml.cpp.
References AddArg(), Ch, EThrow(), GetCh(), GetEncName(), GetEq(), GetName(), GetStalVal(), GetVersionNum(), and GetWs().
Referenced by GetSym().
{ // [23] XMLDecl ::= {{'<?xml'}}... VersionInfo EncodingDecl? SDDecl? S? '?>' // [24] VersionInfo ::= S 'version' Eq (' VersionNum ' | " VersionNum ") GetWs(true); TStr VerNm=GetName("version"); GetEq(); TStr VerVal=GetVersionNum(); if (VerVal!="1.0"){EThrow("Invalid XML version.");} AddArg(VerNm, VerVal); GetWs(false); if (Ch!='?'){ // EncodingDecl ::= {{S}} 'encoding' Eq // ('"' EncName '"' | "'" EncName "'" ) TStr EncNm=GetName("encoding"); GetEq(); TStr EncVal=GetEncName(); AddArg(EncNm, EncVal); } GetWs(false); if (Ch!='?'){ // SDDecl ::= {{S}} 'standalone' Eq // (("'" ('yes' | 'no') "'") | ('"' ('yes' | 'no') '"')) TStr StalNm=GetName("standalone"); GetEq(); TStr StalVal=GetStalVal(); AddArg(StalNm, StalVal); } GetWs(false); if (Ch=='?'){ GetCh(); if (Ch=='>'){GetCh();} else {EThrow("Invalid end-of-tag in XML-declaration.");} } else { EThrow("Invalid end-of-tag in XML-declaration."); } }
TStr TXmlLx::GetXmlLxSymStr | ( | const TXmlLxSym & | XmlLxSym | ) | [static] |
Definition at line 904 of file xml.cpp.
References xsyAttList, xsyComment, xsyDocTypeDecl, xsyElement, xsyEntity, xsyEof, xsyETag, xsyNotation, xsyPI, xsyQStr, xsySETag, xsySTag, xsyStr, xsyTag, xsyUndef, xsyWs, and xsyXmlDecl.
Referenced by TXmlTok::GetSymStr().
{ switch (XmlLxSym){ case xsyUndef: return "Undef"; case xsyWs: return "White-Space"; case xsyComment: return "Comment"; case xsyXmlDecl: return "Declaration"; case xsyPI: return "PI"; case xsyDocTypeDecl: return "Document-Type"; case xsyElement: return "Element"; case xsyAttList: return "Attribute-List"; case xsyEntity: return "Entity"; case xsyNotation: return "Notation"; case xsyTag: return "Tag"; case xsySTag: return "Start-Tag"; case xsyETag: return "End-Tag"; case xsySETag: return "Start-End-Tag"; case xsyStr: return "String"; case xsyQStr: return "Quoted-String"; case xsyEof: return "Eon-Of-File"; default: return "Undef"; } }
TStr TXmlLx::GetXmlStrFromPlainMem | ( | const TMem & | PlainMem | ) | [static] |
Definition at line 945 of file xml.cpp.
References Ch, ChN, TUInt::GetStr(), and TMem::Len().
Referenced by TMem::SaveXml().
{ TChA XmlChA; for (int ChN=0; ChN<PlainMem.Len(); ChN++){ uchar Ch=PlainMem[ChN]; if ((' '<=Ch)&&(Ch<='~')){ switch (Ch){ case '"': XmlChA+="""; break; case '&': XmlChA+="&"; break; case '\'': XmlChA+="'"; break; case '<': XmlChA+="<"; break; case '>': XmlChA+=">"; break; default: XmlChA+=Ch; } } else if ((Ch=='\r')||(Ch=='\n')){ XmlChA+=Ch; } else { XmlChA+='&'; XmlChA+='#'; XmlChA+=TUInt::GetStr(Ch); XmlChA+=';'; } } return XmlChA; }
TStr TXmlLx::GetXmlStrFromPlainStr | ( | const TChA & | PlainChA | ) | [static] |
Definition at line 968 of file xml.cpp.
References Ch, ChN, TUInt::GetStr(), and TChA::Len().
Referenced by TXmlTok::AddTokToChA(), THtmlDoc::GetTxtLnDoc(), THtmlDoc::SaveHtmlToXml(), TChA::SaveXml(), and TStr::SaveXml().
{ TChA XmlChA; for (int ChN=0; ChN<PlainChA.Len(); ChN++){ uchar Ch=PlainChA[ChN]; if ((' '<=Ch)&&(Ch<='~')){ switch (Ch){ case '"': XmlChA+="""; break; case '&': XmlChA+="&"; break; case '\'': XmlChA+="'"; break; case '<': XmlChA+="<"; break; case '>': XmlChA+=">"; break; default: XmlChA+=Ch; } } else if ((Ch=='\r')||(Ch=='\n')){ XmlChA+=Ch; } else { XmlChA+='&'; XmlChA+='#'; XmlChA+=TUInt::GetStr(Ch); XmlChA+=';'; } } return XmlChA; }
bool TXmlLx::IsArgNm | ( | const TStr & | ArgNm | ) | const [inline] |
Definition at line 163 of file xml.h.
References ArgNmValKdV, and TVec< TVal, TSizeTy >::IsIn().
{ return ArgNmValKdV.IsIn(TStrKd(ArgNm));}
bool TXmlLx::IsEntityNm | ( | const TStr & | EntityNm, |
TStr & | EntityVal | ||
) | const [inline] |
Definition at line 175 of file xml.h.
References EntityNmToValH, and THash< TKey, TDat, THashFunc >::IsKeyGetDat().
Referenced by GetReference().
{ return EntityNmToValH.IsKeyGetDat(EntityNm, EntityVal);}
bool TXmlLx::IsPEntityNm | ( | const TStr & | EntityNm, |
TStr & | EntityVal | ||
) | const [inline] |
Definition at line 179 of file xml.h.
References THash< TKey, TDat, THashFunc >::IsKeyGetDat(), and PEntityNmToValH.
Referenced by GetPEReference().
{ return PEntityNmToValH.IsKeyGetDat(EntityNm, EntityVal);}
bool TXmlLx::IsTagNm | ( | const TStr & | Str | ) | [static] |
Definition at line 927 of file xml.cpp.
References ChN, and TChA::Len().
{ TChA ChA=Str; if (ChA.Len()>0){ if (TXmlLx::ChDef.IsFirstNameCh(ChA[0])){ for (int ChN=1; ChN<ChA.Len(); ChN++){ if (!TXmlLx::ChDef.IsName(ChA[ChN])){ return false; } } return true; } else { return false; } } else { return false; } }
void TXmlLx::PutCh | ( | const uchar & | _Ch | ) | [inline, private] |
void TXmlLx::PutEntityVal | ( | const TStr & | Nm, |
const TStr & | Val | ||
) | [inline] |
Definition at line 177 of file xml.h.
References THash< TKey, TDat, THashFunc >::AddDat(), and EntityNmToValH.
Referenced by GetEntity().
{ EntityNmToValH.AddDat(Nm, Val);}
void TXmlLx::PutPEntityVal | ( | const TStr & | Nm, |
const TStr & | Val | ||
) | [inline] |
Definition at line 181 of file xml.h.
References THash< TKey, TDat, THashFunc >::AddDat(), and PEntityNmToValH.
Referenced by GetEntity().
{ PEntityNmToValH.AddDat(Nm, Val);}
void TXmlLx::PutStr | ( | const TStr & | Str | ) | [inline, private] |
void TXmlLx::SkipWs | ( | ) |
Definition at line 752 of file xml.cpp.
References Ch, ChDef, GetCh(), and TXmlChDef::IsWs().
Referenced by GetSym(), and TXmlDoc::LoadTxt().
void TXmlLx::ToNrSpacing | ( | ) | [private] |
Definition at line 270 of file xml.cpp.
References ChDef, TCh::CrCh, Fail, TXmlChDef::IsWs(), TChA::LastCh(), TChA::Len(), TCh::LfCh, TChA::Pop(), TChA::PutCh(), Spacing, TChA::Trunc(), TxtChA, xspIntact, xspPreserve, xspSeparate, and xspTruncate.
Referenced by GetSym().
{ if (Spacing==xspIntact){ } else if (Spacing==xspPreserve){ int SrcChN=0; int DstChN=0; while (SrcChN<TxtChA.Len()){ if (TxtChA[SrcChN]==TCh::CrCh){ TxtChA.PutCh(DstChN, TCh::LfCh); SrcChN++; DstChN++; if ((SrcChN<TxtChA.Len())&&(TxtChA[SrcChN]==TCh::LfCh)){SrcChN++;} } else { if (SrcChN!=DstChN){ TxtChA.PutCh(DstChN, TxtChA[SrcChN]);} SrcChN++; DstChN++; } } TxtChA.Trunc(DstChN); } else if (Spacing==xspSeparate){ // squeeze series of white-spaces to single space int SrcChN=0; int DstChN=0; while (SrcChN<TxtChA.Len()){ if (ChDef.IsWs(TxtChA[SrcChN])){ if ((DstChN>0)&&(TxtChA[DstChN-1]==' ')){ SrcChN++; } else { TxtChA.PutCh(DstChN, ' '); SrcChN++; DstChN++; } } else { TxtChA.PutCh(DstChN, TxtChA[SrcChN]); SrcChN++; DstChN++; } } TxtChA.Trunc(DstChN); } else if (Spacing==xspTruncate){ // cut leading and trailing white-spaces and // squeeze series of white-spaces to single space int SrcChN=0; int DstChN=0; while (SrcChN<TxtChA.Len()){ if (ChDef.IsWs(TxtChA[SrcChN])){ if ((DstChN>0)&&(TxtChA[DstChN-1]==' ')){ SrcChN++; } else { TxtChA.PutCh(DstChN, ' '); SrcChN++; DstChN++; } } else { TxtChA.PutCh(DstChN, TxtChA[SrcChN]); SrcChN++; DstChN++; } } TxtChA.Trunc(DstChN); // delete trailing white-spaces while ((TxtChA.Len()>0)&&(ChDef.IsWs(TxtChA.LastCh()))){ TxtChA.Pop();} } else { Fail; } }
Definition at line 142 of file xml.h.
Referenced by AddArg(), ClrArgV(), GetArg(), GetArgs(), GetArgVal(), TXmlTok::GetTok(), and IsArgNm().
uchar TXmlLx::Ch [private] |
Definition at line 104 of file xml.h.
Referenced by GetAttList(), GetAttValue(), GetCDSect(), GetCh(), GetComment(), GetDocTypeDecl(), GetElement(), GetEncName(), GetEntity(), GetEntityValue(), GetEq(), GetName(), GetNotation(), GetPEReference(), GetPI(), GetPlainStrFromXmlStr(), GetPubidLiteral(), GetReference(), GetStalVal(), GetSym(), GetSystemLiteral(), GetUsAsciiStrFromXmlStr(), GetVersionNum(), GetWs(), GetXmlDecl(), GetXmlStrFromPlainMem(), GetXmlStrFromPlainStr(), PutCh(), and SkipWs().
TXmlChDef TXmlLx::ChDef [static, private] |
Definition at line 100 of file xml.h.
Referenced by GetAttList(), GetAttValue(), GetCDSect(), GetComment(), GetDocTypeDecl(), GetElement(), GetEntityValue(), GetName(), GetNotation(), GetPI(), GetPubidLiteral(), GetReference(), GetSym(), GetSystemLiteral(), GetWs(), SkipWs(), and ToNrSpacing().
int TXmlLx::ChN [private] |
Definition at line 105 of file xml.h.
Referenced by GetCh(), GetUsAsciiStrFromXmlStr(), GetXmlStrFromPlainMem(), GetXmlStrFromPlainStr(), IsTagNm(), and PutStr().
TChA TXmlLx::ChStack [private] |
TStrStrH TXmlLx::EntityNmToValH [private] |
Definition at line 113 of file xml.h.
Referenced by IsEntityNm(), and PutEntityVal().
int TXmlLx::LnChN [private] |
Definition at line 105 of file xml.h.
Referenced by EThrow(), GetCh(), and GetFPosStr().
int TXmlLx::LnN [private] |
Definition at line 105 of file xml.h.
Referenced by EThrow(), GetCh(), and GetFPosStr().
TStrStrH TXmlLx::PEntityNmToValH [private] |
Definition at line 113 of file xml.h.
Referenced by IsPEntityNm(), and PutPEntityVal().
uchar TXmlLx::PrevCh [private] |
TSIn& TXmlLx::RSIn [private] |
PSIn TXmlLx::SIn [private] |
Definition at line 101 of file xml.h.
Referenced by EThrow(), and GetFPosStr().
TXmlSpacing TXmlLx::Spacing [private] |
Definition at line 106 of file xml.h.
Referenced by GetSym(), and ToNrSpacing().
Definition at line 139 of file xml.h.
Referenced by GetSym(), GetSymStr(), TXmlTok::GetTok(), TStrUtil::GetXmlTagNmVal2(), TSnap::LoadDyNet(), TSnap::LoadDyNetGraphV(), TXmlDoc::LoadTxt(), TXmlDoc::LoadTxtElement(), TXmlDoc::LoadTxtMiscStar(), and TXmlDoc::SkipTopTag().
Definition at line 141 of file xml.h.
Referenced by GetDocTypeDecl(), GetEntity(), GetSym(), GetSymStr(), TXmlTok::GetTok(), TStrUtil::GetXmlTagNmVal(), TStrUtil::GetXmlTagNmVal2(), TStrUtil::GetXmlTagVal(), TSnap::LoadDyNet(), TSnap::LoadDyNetGraphV(), and TXmlDoc::LoadTxtElement().
Definition at line 140 of file xml.h.
Referenced by GetAttList(), GetCDSect(), GetComment(), GetElement(), GetNotation(), GetPI(), GetSym(), GetSymStr(), TXmlTok::GetTok(), GetWs(), TStrUtil::GetXmlTagNmVal(), TStrUtil::GetXmlTagNmVal2(), TStrUtil::GetXmlTagVal(), and ToNrSpacing().