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
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Defines
xml.h
Go to the documentation of this file.
00001 #include "bd.h"
00002 
00004 // Xml-Object-Serialization
00005 class TXmlObjSer{
00006 private:
00007   static TStrStrH TypeNmToTagNmH;
00008 public:
00009   static TStr GetTagNm(const TStr& TypeNm);
00010   static void AssertXmlHd(
00011    const PXmlTok& XmlTok, const TStr& Nm, const TStr& TypeNm);
00012   static bool GetBoolArg(const PXmlTok& XmlTok, const TStr& Nm);
00013   static int GetIntArg(const PXmlTok& XmlTok, const TStr& Nm);
00014   static int64 GetInt64Arg(const PXmlTok& XmlTok, const TStr& Nm);
00015   static double GetFltArg(const PXmlTok& XmlTok, const TStr& Nm);
00016 };
00017 
00019 // Xml-Object-Serialization-Tag-Name
00020 class TXmlObjSerTagNm{
00021 private:
00022   TStr TagNm;
00023   TSOut* SOut;
00024   UndefDefaultCopyAssign(TXmlObjSerTagNm);
00025 public:
00026   TXmlObjSerTagNm(
00027    TSOut& _SOut, const bool& ETagP,
00028    const TStr& Nm, const TStr& TypeNm,
00029    const TStr& ArgNm="", const TStr& ArgVal="");
00030   TXmlObjSerTagNm(
00031    TSOut& _SOut, const bool& ETagP,
00032    const TStr& Nm, const TStr& TypeNm,
00033    const TStr& ArgNm1, const TStr& ArgVal1,
00034    const TStr& ArgNm2, const TStr& ArgVal2,
00035    const TStr& ArgNm3="", const TStr& ArgVal3="",
00036    const TStr& ArgNm4="", const TStr& ArgVal4="");
00037   ~TXmlObjSerTagNm();
00038 };
00039 
00041 // Xml-Char-Definition
00042 ClassTP(TXmlChDef, PXmlChDef)//{
00043 private:
00044   TInt Chs;
00045   TBSet CharChSet, CombChSet, ExtChSet;
00046   TBSet LetterChSet, DigitChSet, NameChSet, PubidChSet;
00047   TStrStrH EntityNmToValH;
00048   void SetChTy(TBSet& ChSet, const int& MnCh, const int& MxCh=-1);
00049   void SetChTy(TBSet& ChSet, const TStr& Str);
00050   void SetEntityVal(const TStr& Nm, const TStr& Val);
00051 public:
00052   TXmlChDef();
00053   TXmlChDef(TSIn& SIn):
00054     Chs(SIn),
00055     CharChSet(SIn), CombChSet(SIn), ExtChSet(SIn),
00056     LetterChSet(SIn), DigitChSet(SIn), NameChSet(SIn), PubidChSet(SIn),
00057     EntityNmToValH(SIn){}
00058   static PXmlChDef Load(TSIn& SIn){return new TXmlChDef(SIn);}
00059   void Save(TSOut& SOut){
00060     Chs.Save(SOut);
00061     CharChSet.Save(SOut); CombChSet.Save(SOut); ExtChSet.Save(SOut);
00062     LetterChSet.Save(SOut); DigitChSet.Save(SOut); NameChSet.Save(SOut);
00063     PubidChSet.Save(SOut);
00064     EntityNmToValH.Save(SOut);}
00065 
00066   TXmlChDef& operator=(const TXmlChDef&){Fail; return *this;}
00067 
00068   bool IsChar(const uchar& Ch) const {return CharChSet.GetBit(Ch);}
00069   bool IsComb(const uchar& Ch) const {return CombChSet.GetBit(Ch);}
00070   bool IsExt(const uchar& Ch) const {return ExtChSet.GetBit(Ch);}
00071   bool IsLetter(const uchar& Ch) const {return LetterChSet.GetBit(Ch);}
00072   bool IsDigit(const uchar& Ch) const {return DigitChSet.GetBit(Ch);}
00073   bool IsName(const uchar& Ch) const {return NameChSet.GetBit(Ch);}
00074   bool IsPubid(const uchar& Ch) const {return PubidChSet.GetBit(Ch);}
00075 
00076   bool IsWs(const uchar& Ch) const {
00077     return (Ch==' ')||(Ch==TCh::CrCh)||(Ch==TCh::LfCh)||(Ch==TCh::TabCh);}
00078   bool IsFirstNameCh(const uchar& Ch) const {
00079     return IsLetter(Ch)||(Ch=='_')||(Ch==':');}
00080   bool IsEoln(const uchar& Ch) const {
00081     return (Ch==TCh::CrCh)||(Ch==TCh::LfCh);}
00082 
00083   bool IsEntityNm(const TStr& EntityNm, TStr& EntityVal) const {
00084     return EntityNmToValH.IsKeyGetDat(EntityNm, EntityVal);}
00085 };
00086 
00088 // Xml-Lexical
00089 typedef enum {
00090   xsyUndef, xsyWs, xsyComment,
00091   xsyXmlDecl, xsyPI,
00092   xsyDocTypeDecl, xsyElement, xsyAttList, xsyEntity, xsyNotation,
00093   xsyTag, xsySTag, xsyETag, xsySETag, xsyStr, xsyQStr,
00094   xsyEof} TXmlLxSym;
00095 
00096 typedef enum {xspIntact, xspPreserve, xspSeparate, xspTruncate} TXmlSpacing;
00097 
00098 class TXmlLx{
00099 private: // character level functions
00100   static TXmlChDef ChDef;
00101   PSIn SIn;
00102   TSIn& RSIn;
00103   TChA ChStack;
00104   uchar PrevCh, Ch;
00105   int LnN, LnChN, ChN;
00106   TXmlSpacing Spacing;
00107   uchar GetCh();
00108   void PutCh(const uchar& _Ch){ChStack.Push(Ch); Ch=_Ch;}
00109   void PutStr(const TStr& Str){
00110     for (int ChN=Str.Len()-1; ChN>=0; ChN--){PutCh(Str[ChN]);}}
00111   void ToNrSpacing();
00112 private: // part-of-symbol level functions
00113   TStrStrH EntityNmToValH, PEntityNmToValH;
00114   void GetWs(const bool& IsRq);
00115   TStr GetReference();
00116   void GetEq();
00117   TStr GetName();
00118   TStr GetName(const TStr& RqNm);
00119   void GetComment();
00120   TStr GetAttValue();
00121   TStr GetVersionNum();
00122   TStr GetEncName();
00123   TStr GetStalVal();
00124   void GetXmlDecl();
00125   void GetPI();
00126   TStr GetSystemLiteral();
00127   TStr GetPubidLiteral();
00128   TStr GetPEReference();
00129   void GetExternalId();
00130   void GetNData();
00131   void GetDocTypeDecl();
00132   void GetElement();
00133   void GetAttList();
00134   TStr GetEntityValue();
00135   void GetEntity();
00136   void GetNotation();
00137   void GetCDSect();
00138 public: // symbol state
00139   TXmlLxSym Sym;
00140   TChA TxtChA;
00141   TStr TagNm;
00142   TStrKdV ArgNmValKdV;
00143   void SkipWs();
00144 public:
00145   TXmlLx(const PSIn& _SIn, const TXmlSpacing& _Spacing=xspIntact):
00146     SIn(_SIn), RSIn(*SIn),
00147     ChStack(), PrevCh(' '), Ch(' '),
00148     LnN(1), LnChN(0), ChN(0), Spacing(_Spacing),
00149     EntityNmToValH(100), PEntityNmToValH(100),
00150     Sym(xsyUndef), TxtChA(), TagNm(), ArgNmValKdV(10){GetCh();}
00151 
00152   TXmlLx& operator=(const TXmlLx&){Fail; return *this;}
00153 
00154   TXmlLxSym GetSym();
00155   TStr GetSymStr() const;
00156   void EThrow(const TStr& MsgStr) const;
00157   TStr GetFPosStr() const;
00158 
00159   // tag arguments
00160   void ClrArgV(){ArgNmValKdV.Clr();}
00161   void AddArg(const TStr& ArgNm, const TStr& ArgVal){
00162     ArgNmValKdV.Add(TStrKd(ArgNm, ArgVal));}
00163   bool IsArgNm(const TStr& ArgNm) const {
00164     return ArgNmValKdV.IsIn(TStrKd(ArgNm));}
00165   int GetArgs() const {return ArgNmValKdV.Len();}
00166   void GetArg(const int& ArgN, TStr& ArgNm, TStr& ArgVal) const {
00167     ArgNm=ArgNmValKdV[ArgN].Key; ArgVal=ArgNmValKdV[ArgN].Dat;}
00168   TStr GetArgVal(const TStr& ArgNm, const TStr& DfVal=TStr()) const {
00169     int ArgN=ArgNmValKdV.SearchForw(TStrKd(ArgNm));
00170     if (ArgN==-1){return DfVal;} else {return ArgNmValKdV[ArgN].Dat;}}
00171   static char GetArgValQCh(const TStr& ArgVal){
00172     if (ArgVal.IsChIn('\"')){return '\'';} else {return '\"';}}
00173 
00174   // entities
00175   bool IsEntityNm(const TStr& EntityNm, TStr& EntityVal) const {
00176     return EntityNmToValH.IsKeyGetDat(EntityNm, EntityVal);}
00177   void PutEntityVal(const TStr& Nm, const TStr& Val){
00178     EntityNmToValH.AddDat(Nm, Val);}
00179   bool IsPEntityNm(const TStr& EntityNm, TStr& EntityVal) const {
00180     return PEntityNmToValH.IsKeyGetDat(EntityNm, EntityVal);}
00181   void PutPEntityVal(const TStr& Nm, const TStr& Val){
00182     PEntityNmToValH.AddDat(Nm, Val);}
00183 
00184   // symbol to string conversion
00185   static TStr GetXmlLxSymStr(const TXmlLxSym& XmlLxSym);
00186 
00187   // string conversion
00188   static bool IsTagNm(const TStr& Str);
00189   static TStr GetXmlStrFromPlainMem(const TMem& PlainMem);
00190   static TStr GetXmlStrFromPlainStr(const TChA& PlainChA);
00191   static TStr GetPlainStrFromXmlStr(const TStr& XmlStr);
00192   static TStr GetUsAsciiStrFromXmlStr(const TStr& EntRefStr);
00193   static TStr GetChRefFromYuEntRef(const TStr& YuEntRefStr);
00194 };
00195 
00197 // Xml-Token
00198 ClassTPV(TXmlTok, PXmlTok, TXmlTokV)//{
00199 private:
00200   TXmlLxSym Sym;
00201   TStr Str;
00202   TStrKdV ArgNmValV;
00203   TXmlTokV SubTokV;
00204 public:
00205   TXmlTok(): Sym(xsyUndef), Str(), ArgNmValV(), SubTokV(){}
00206   TXmlTok(const TXmlLxSym& _Sym):
00207     Sym(_Sym), Str(), ArgNmValV(), SubTokV(){}
00208   TXmlTok(const TXmlLxSym& _Sym, const TStr& _Str):
00209     Sym(_Sym), Str(_Str), ArgNmValV(), SubTokV(){}
00210   TXmlTok(const TXmlLxSym& _Sym, const TStr& _Str, const TStrKdV& _ArgNmValV):
00211     Sym(_Sym), Str(_Str), ArgNmValV(_ArgNmValV){}
00212   static PXmlTok New(){return PXmlTok(new TXmlTok());}
00213   static PXmlTok New(const TXmlLxSym& Sym){return PXmlTok(new TXmlTok(Sym));}
00214   static PXmlTok New(const TXmlLxSym& Sym, const TStr& Str){
00215     return PXmlTok(new TXmlTok(Sym, Str));}
00216   static PXmlTok New(
00217    const TXmlLxSym& Sym, const TStr& Str, const TStrKdV& ArgNmValV){
00218     return PXmlTok(new TXmlTok(Sym, Str, ArgNmValV));}
00219   static PXmlTok New(
00220    const TStr& TagNm, const TStrKdV& ArgNmValV){
00221     return PXmlTok(new TXmlTok(xsyTag, TagNm, ArgNmValV));}
00222   static PXmlTok New(const TStr& TagNm){
00223     return PXmlTok(new TXmlTok(xsyTag, TagNm));}
00224   static PXmlTok New(const TStr& TagNm, const TStr& ValStr){
00225     PXmlTok TagXmlTok=PXmlTok(new TXmlTok(xsyTag, TagNm));
00226     PXmlTok StrXmlTok=PXmlTok(new TXmlTok(xsyStr, ValStr));
00227     TagXmlTok->AddSubTok(StrXmlTok); return TagXmlTok;}
00228   static PXmlTok New(const TStr& TagNm,
00229    const PXmlTok& XmlTok1, const PXmlTok& XmlTok2=NULL){
00230     PXmlTok TagXmlTok=PXmlTok(new TXmlTok(xsyTag, TagNm));
00231     if (!XmlTok1.Empty()){TagXmlTok->AddSubTok(XmlTok1);}
00232     if (!XmlTok2.Empty()){TagXmlTok->AddSubTok(XmlTok2);}
00233     return TagXmlTok;}
00234   TXmlTok(TSIn&){Fail;}
00235   static PXmlTok Load(TSIn&){Fail; return NULL;}
00236   void Save(TSOut&){Fail;}
00237 
00238   TXmlTok& operator=(const TXmlTok&){Fail; return *this;}
00239 
00240   // type-of-token and text value (xsyWs, xsyStr, xsyQStr, xsyTag)
00241   TXmlLxSym GetSym() const {return Sym;}
00242   TStr GetSymStr() const {return TXmlLx::GetXmlLxSymStr(Sym);}
00243   void PutStr(const TStr& _Str){Str=_Str;}
00244   TStr GetStr() const {return Str;}
00245 
00246   // tags
00247   bool IsTag() const {return (Sym==xsyTag);}
00248   bool IsTag(const TStr& TagNm) const {return (Sym==xsyTag)&&(Str==TagNm);}
00249   TStr GetTagNm() const {IAssert(Sym==xsyTag); return Str;}
00250 
00251   // tag argument
00252   void AddArg(const TStr& ArgNm, const bool& ArgVal){
00253     ArgNmValV.Add(TStrKd(ArgNm, TBool::GetStr(ArgVal)));}
00254   void AddArg(const TStr& ArgNm, const int& ArgVal){
00255     ArgNmValV.Add(TStrKd(ArgNm, TInt::GetStr(ArgVal)));}
00256   void AddArg(const TStr& ArgNm, const uint64& ArgVal){
00257     ArgNmValV.Add(TStrKd(ArgNm, TUInt64::GetStr(ArgVal)));}
00258   void AddArg(const TStr& ArgNm, const double& ArgVal){
00259     ArgNmValV.Add(TStrKd(ArgNm, TFlt::GetStr(ArgVal)));}
00260   void AddArg(const TStr& ArgNm, const TStr& ArgVal){
00261     ArgNmValV.Add(TStrKd(ArgNm, ArgVal));}
00262   int GetArgs() const {return ArgNmValV.Len();}
00263   void GetArg(const int& ArgN, TStr& ArgNm, TStr& ArgVal) const {
00264     ArgNm=ArgNmValV[ArgN].Key; ArgVal=ArgNmValV[ArgN].Dat;}
00265   bool IsArg(const TStr& ArgNm) const {
00266     return ArgNmValV.SearchForw(TStrKd(ArgNm))!=-1;}
00267   bool IsArg(const TStr& ArgNm, TStr& ArgVal) const {
00268     int ArgN=ArgNmValV.SearchForw(TStrKd(ArgNm));
00269     if (ArgN!=-1){ArgVal=ArgNmValV[ArgN].Dat;}
00270     return ArgN!=-1;}
00271   void PutArgVal(const TStr& ArgNm, const TStr& ArgVal){
00272     ArgNmValV[ArgNmValV.SearchForw(TStrKd(ArgNm))].Dat=ArgVal;}
00273   TStr GetArgVal(const TStr& ArgNm) const {
00274     return ArgNmValV[ArgNmValV.SearchForw(TStrKd(ArgNm))].Dat;}
00275   TStr GetArgVal(const TStr& ArgNm, const TStr& DfArgVal) const {
00276     int ArgN=ArgNmValV.SearchForw(TStrKd(ArgNm));
00277     return (ArgN==-1) ? DfArgVal : ArgNmValV[ArgN].Dat;}
00278   bool GetBoolArgVal(const TStr& ArgNm, const bool& DfVal=false) const;
00279   bool GetBoolArgVal(
00280    const TStr& ArgNm, const TStr& TrueVal, const bool& DfVal=false) const;
00281   bool GetBoolArgVal(const TStr& ArgNm,
00282    const TStr& TrueVal, const TStr& FalseVal, const bool& DfVal=false) const;
00283   int GetIntArgVal(const TStr& ArgNm, const int& DfVal=0) const;
00284   double GetFltArgVal(const TStr& ArgNm, const double& DfVal=0) const;
00285   TStr GetStrArgVal(const TStr& ArgNm, const TStr& DfVal=TStr()) const;
00286 
00287   // sub tokens
00288   bool IsSubTag(const TStr& TagNm) const {
00289     return !GetTagTok(TagNm).Empty();}
00290   bool IsSubTag(const TStr& TagNm, PXmlTok& Tok) const {
00291     Tok=GetTagTok(TagNm); return !Tok.Empty();}
00292   void AddSubTok(const PXmlTok& Tok){SubTokV.Add(Tok);}
00293   int GetSubToks() const {return SubTokV.Len();}
00294   PXmlTok GetSubTok(const int& SubTokN) const {return SubTokV[SubTokN];}
00295   void ClrSubTok(){SubTokV.Clr();}
00296   void PutSubTok(const PXmlTok& Tok, const int& SubTokN=-1);
00297 
00298   // value retrieval
00299   bool IsTagTok(const TStr& TagPath, PXmlTok& TagTok) const {
00300     TagTok=GetTagTok(TagPath); return !TagTok.Empty();}
00301   bool IsTagTok(const TStr& TagPath) const {
00302     PXmlTok TagTok; return IsTagTok(TagPath, TagTok);}
00303   PXmlTok GetTagTok(const TStr& TagPath) const;
00304   void GetTagTokV(const TStr& TagPath, TXmlTokV& XmlTokV) const;
00305   void GetTagValV(const TStr& TagNm, const bool& XmlP, TStrV& ValV) const;
00306   TStr GetTagVal(const TStr& TagNm, const bool& XmlP) const;
00307   TStr GetTagTokStr(const TStr& TagPath) const {
00308     return GetTagTok(TagPath)->GetTokStr(false);}
00309   TStr GetTagTokStrOrDf(const TStr& TagPath, const TStr& DfVal=TStr()) const {
00310     PXmlTok TagTok;
00311     if (IsTagTok(TagPath, TagTok)){return TagTok->GetTokStr(false);}
00312     else {return DfVal;}}
00313 
00314   // string representation for the token
00315   void AddTokToChA(const bool& XmlP, TChA& ChA) const;
00316   TStr GetTokStr(const bool& XmlP=true) const {
00317     TChA ChA; AddTokToChA(XmlP, ChA); return ChA;}
00318   static TStr GetTokVStr(const TXmlTokV& TokV, const bool& XmlP=true);
00319 
00320   // convert current lexical symbol to token
00321   static PXmlTok GetTok(TXmlLx& Lx);
00322 };
00323 
00325 // Xml-Document
00326 ClassTPV(TXmlDoc, PXmlDoc, TXmlDocV)//{
00327 private:
00328   bool Ok;
00329   TStr MsgStr;
00330   PXmlTok Tok;
00331   static void LoadTxtMiscStar(TXmlLx& Lx);
00332   static PXmlTok LoadTxtElement(TXmlLx& Lx);
00333 public:
00334   TXmlDoc(): Ok(false), MsgStr(), Tok(){}
00335   static PXmlDoc New(){return PXmlDoc(new TXmlDoc());}
00336   TXmlDoc(const PXmlTok& _Tok): Ok(!_Tok.Empty()), MsgStr(), Tok(_Tok){}
00337   static PXmlDoc New(const PXmlTok& Tok){return PXmlDoc(new TXmlDoc(Tok));}
00338   TXmlDoc(TSIn&){Fail;}
00339   static PXmlDoc Load(TSIn& SIn){return new TXmlDoc(SIn);}
00340   void Save(TSOut&){Fail;}
00341 
00342   TXmlDoc& operator=(const TXmlDoc&){Fail; return *this;}
00343 
00344   // component retrieval
00345   bool IsOk() const {return Ok;}
00346   TStr GetMsgStr() const {return MsgStr;}
00347   PXmlTok GetTok() const {IAssert(Ok); return Tok;}
00348 
00349   // value retrieval
00350   bool IsTagTok(const TStr& TagPath, PXmlTok& TagTok) const {
00351     IAssert(Ok); TagTok=GetTagTok(TagPath); return !TagTok.Empty();}
00352   bool IsTagTok(const TStr& TagPath) const {
00353     PXmlTok TagTok; return IsTagTok(TagPath, TagTok);}
00354   PXmlTok GetTagTok(const TStr& TagPath) const;
00355   void PutTagTokStr(const TStr& TagPath, const TStr& TokStr) const;
00356   TStr GetTagTokStr(const TStr& TagPath) const {
00357     return GetTagTok(TagPath)->GetTokStr(false);}
00358   void GetTagTokV(const TStr& TagPath, TXmlTokV& XmlTokV) const;
00359   void GetTagValV(const TStr& TagNm, const bool& XmlP, TStrV& ValV) const {
00360     IAssert(Ok); Tok->GetTagValV(TagNm, XmlP, ValV);}
00361   TStr GetTagVal(const TStr& TagNm, const bool& XmlP) const {
00362     TStrV ValV; GetTagValV(TagNm, XmlP, ValV);
00363     if (ValV.Len()>0){return ValV[0];} else {return "";}}
00364   bool GetTagTokBoolArgVal(
00365    const TStr& TagPath, const TStr& ArgNm, const bool& DfVal=false) const;
00366   int GetTagTokIntArgVal(
00367    const TStr& TagPath, const TStr& ArgNm, const int& DfVal=0) const;
00368   double GetTagTokFltArgVal(
00369    const TStr& TagPath, const TStr& ArgNm, const double& DfVal=0) const;
00370   TStr GetTagTokStrArgVal(
00371    const TStr& TagPath, const TStr& ArgNm, const TStr& DfVal=TStr()) const;
00372 
00373   // string representation
00374   static TStr GetXmlStr(const TStr& Str);
00375 
00376   // loading/saving document
00377   static bool SkipTopTag(const PSIn& SIn);
00378   static PXmlDoc LoadTxt(TXmlLx& Lx);
00379   static PXmlDoc LoadTxt(const PSIn& SIn, const TXmlSpacing& Spacing=xspIntact);
00380   static PXmlDoc LoadTxt(const TStr& FNm, const TXmlSpacing& Spacing=xspIntact);
00381   static void LoadTxt(
00382    const TStr& FNm, TXmlDocV& XmlDocV, const TXmlSpacing& Spacing=xspIntact);
00383   void SaveTxt(const PSOut& SOut){
00384     SOut->PutStr(GetTok()->GetTokStr());}
00385   void SaveTxt(const TStr& FNm, const bool& Append=false){
00386     PSOut SOut=TFOut::New(FNm, Append); SaveTxt(SOut);}
00387   static PXmlDoc LoadStr(const TStr& Str);
00388   void SaveStr(TStr& Str);
00389 };
00390 
00392 // Fast and dirty XML parser 
00393 // very basic it does only <item>string</item>, no comments, no arguments
00394 class TXmlParser;
00395 typedef TPt<TXmlParser> PXmlParser;
00396 
00397 class TXmlParser {  //J:
00398 private:
00399   TCRef CRef;
00400   PSIn SIn;
00401   TSIn& RSIn;
00402   TChA _SymStr;
00403 public:
00404   TXmlLxSym Sym, NextSym;
00405   TChA SymStr, NextSymStr;
00406 private:
00407   char GetCh() { return (! RSIn.Eof()) ? RSIn.GetCh() : TCh::EofCh; }
00408 public:
00409   TXmlParser(const PSIn& _SIn) : SIn(_SIn), RSIn(*SIn), Sym(xsyUndef), NextSym(xsyUndef) { }
00410   static PXmlParser New(const PSIn& SIn) { return new TXmlParser(SIn); }
00411 
00412   TXmlLxSym GetSym();
00413   TXmlLxSym GetSym(TChA& _SymStr);
00414   TXmlLxSym PeekSym();
00415   TXmlLxSym PeekSym(TChA& _SymStr);
00416   void SkipTillTag(const TChA& _SymStr);
00417   
00418   TXmlLxSym GetTag(const TChA& TagStr);
00419   void GetTagVal(const TChA& TagStr, TChA& TagVal);
00420   
00421   static void GetPlainStrFromXmlStr(const TChA& XmlStr, TChA& PlainChA);
00422   friend class TPt<TXmlParser>;
00423 };