ROOT  6.06/09
Reference Guide
Public Member Functions | Protected Member Functions | Protected Attributes | List of all members
TXMLEngine Class Reference

Definition at line 28 of file TXMLEngine.h.

Public Member Functions

 TXMLEngine ()
 if true, do not create comments nodes in document during parsing More...
 
virtual ~TXMLEngine ()
 destructor for TXMLEngine object More...
 
void SetSkipComments (Bool_t on=kTRUE)
 
Bool_t GetSkipComments () const
 
Bool_t HasAttr (XMLNodePointer_t xmlnode, const char *name)
 checks if node has attribute of specified name More...
 
const char * GetAttr (XMLNodePointer_t xmlnode, const char *name)
 returns value of attribute for xmlnode More...
 
Int_t GetIntAttr (XMLNodePointer_t node, const char *name)
 returns value of attribute as integer More...
 
XMLAttrPointer_t NewAttr (XMLNodePointer_t xmlnode, XMLNsPointer_t, const char *name, const char *value)
 creates new attribute for xmlnode, namespaces are not supported for attributes More...
 
XMLAttrPointer_t NewIntAttr (XMLNodePointer_t xmlnode, const char *name, Int_t value)
 create node attribute with integer value More...
 
void FreeAttr (XMLNodePointer_t xmlnode, const char *name)
 remove attribute from xmlnode More...
 
void FreeAllAttr (XMLNodePointer_t xmlnode)
 Free all attributes of the node. More...
 
XMLAttrPointer_t GetFirstAttr (XMLNodePointer_t xmlnode)
 return first attribute in the list, namespace (if exists) will be skiped More...
 
XMLAttrPointer_t GetNextAttr (XMLAttrPointer_t xmlattr)
 return next attribute in the list More...
 
const char * GetAttrName (XMLAttrPointer_t xmlattr)
 return name of the attribute More...
 
const char * GetAttrValue (XMLAttrPointer_t xmlattr)
 return value of attribute More...
 
XMLNodePointer_t NewChild (XMLNodePointer_t parent, XMLNsPointer_t ns, const char *name, const char *content=0)
 create new child element for parent node More...
 
XMLNsPointer_t NewNS (XMLNodePointer_t xmlnode, const char *reference, const char *name=0)
 create namespace attribute for xmlnode. More...
 
XMLNsPointer_t GetNS (XMLNodePointer_t xmlnode)
 return namespace attribute (if exists) More...
 
const char * GetNSName (XMLNsPointer_t ns)
 return name id of namespace More...
 
const char * GetNSReference (XMLNsPointer_t ns)
 return reference id of namespace More...
 
void AddChild (XMLNodePointer_t parent, XMLNodePointer_t child)
 add child element to xmlnode More...
 
void AddChildFirst (XMLNodePointer_t parent, XMLNodePointer_t child)
 add node as first child More...
 
Bool_t AddComment (XMLNodePointer_t parent, const char *comment)
 Adds comment line to the node. More...
 
Bool_t AddDocComment (XMLDocPointer_t xmldoc, const char *comment)
 add comment line to the top of the document More...
 
Bool_t AddRawLine (XMLNodePointer_t parent, const char *line)
 Add just line into xml file Line should has correct xml syntax that later it can be decoded by xml parser For instance, it can be comment or processing instructions. More...
 
Bool_t AddDocRawLine (XMLDocPointer_t xmldoc, const char *line)
 Add just line on the top of xml document Line should has correct xml syntax that later it can be decoded by xml parser. More...
 
Bool_t AddStyleSheet (XMLNodePointer_t parent, const char *href, const char *type="text/css", const char *title=0, int alternate=-1, const char *media=0, const char *charset=0)
 Adds style sheet definition to the specified node Creates <?xml-stylesheet alternate="yes" title="compact" href="small-base.css" type="text/css"?> Attributes href and type must be supplied, other attributes: title, alternate, media, charset are optional if alternate==0, attribyte alternate="no" will be created, if alternate>0, attribute alternate="yes" if alternate<0, attribute will not be created. More...
 
Bool_t AddDocStyleSheet (XMLDocPointer_t xmldoc, const char *href, const char *type="text/css", const char *title=0, int alternate=-1, const char *media=0, const char *charset=0)
 Add style sheet definition on the top of document. More...
 
void UnlinkNode (XMLNodePointer_t node)
 unlink (dettach) xml node from parent More...
 
void FreeNode (XMLNodePointer_t xmlnode)
 release all memory, allocated fro this node and destroyes node itself More...
 
void UnlinkFreeNode (XMLNodePointer_t xmlnode)
 combined operation. Unlink node and free used memory More...
 
const char * GetNodeName (XMLNodePointer_t xmlnode)
 returns name of xmlnode More...
 
const char * GetNodeContent (XMLNodePointer_t xmlnode)
 get contents (if any) of xml node More...
 
void SetNodeContent (XMLNodePointer_t xmlnode, const char *content, Int_t len=0)
 set content of the xml node if old node content was exists, it will be replaced More...
 
void AddNodeContent (XMLNodePointer_t xmlnode, const char *content, Int_t len=0)
 add new content of the xml node old content will be preserved, one could mix content with child nodes More...
 
XMLNodePointer_t GetChild (XMLNodePointer_t xmlnode, Bool_t realnode=kTRUE)
 returns first child of xml node More...
 
XMLNodePointer_t GetParent (XMLNodePointer_t xmlnode)
 returns parent of xmlnode More...
 
XMLNodePointer_t GetNext (XMLNodePointer_t xmlnode, Bool_t realnode=kTRUE)
 return next to xmlnode node if realnode==kTRUE, any special nodes in between will be skipped More...
 
void ShiftToNext (XMLNodePointer_t &xmlnode, Bool_t realnode=kTRUE)
 shifts specified node to next if realnode==kTRUE, any special nodes in between will be skipped More...
 
Bool_t IsXmlNode (XMLNodePointer_t xmlnode)
 return kTRUE is this is normal xml node More...
 
Bool_t IsEmptyNode (XMLNodePointer_t xmlnode)
 return kTRUE is this is node with special data like comments to data processing instructions More...
 
Bool_t IsContentNode (XMLNodePointer_t xmlnode)
 return kTRUE is this is special node with content More...
 
Bool_t IsCommentNode (XMLNodePointer_t xmlnode)
 return kTRUE is this is special node with content More...
 
void SkipEmpty (XMLNodePointer_t &xmlnode)
 Skip all current empty nodes and locate on first "true" node. More...
 
void CleanNode (XMLNodePointer_t xmlnode)
 remove all children node from xmlnode More...
 
XMLDocPointer_t NewDoc (const char *version="1.0")
 creates new xml document with provided version More...
 
void AssignDtd (XMLDocPointer_t xmldoc, const char *dtdname, const char *rootname)
 assignes dtd filename to document More...
 
void FreeDoc (XMLDocPointer_t xmldoc)
 frees allocated document data and deletes document itself More...
 
void SaveDoc (XMLDocPointer_t xmldoc, const char *filename, Int_t layout=1)
 store document content to file if layout<=0, no any spaces or newlines will be placed between xmlnodes. More...
 
void DocSetRootElement (XMLDocPointer_t xmldoc, XMLNodePointer_t xmlnode)
 set main (root) node for document More...
 
XMLNodePointer_t DocGetRootElement (XMLDocPointer_t xmldoc)
 returns root node of document More...
 
XMLDocPointer_t ParseFile (const char *filename, Int_t maxbuf=100000)
 Parses content of file and tries to produce xml structures. More...
 
XMLDocPointer_t ParseString (const char *xmlstring)
 parses content of string and tries to produce xml structures More...
 
Bool_t ValidateVersion (XMLDocPointer_t doc, const char *version=0)
 check that first node is xml processing instruction with correct xml version number More...
 
Bool_t ValidateDocument (XMLDocPointer_t, Bool_t=kFALSE)
 
void SaveSingleNode (XMLNodePointer_t xmlnode, TString *res, Int_t layout=1)
 convert single xml node (and its child node) to string if layout<=0, no any spaces or newlines will be placed between xmlnodes. More...
 
XMLNodePointer_t ReadSingleNode (const char *src)
 read single xml node from provided string More...
 
 ClassDef (TXMLEngine, 1)
 
- Public Member Functions inherited from TObject
 TObject ()
 
 TObject (const TObject &object)
 TObject copy ctor. More...
 
TObjectoperator= (const TObject &rhs)
 TObject assignment operator. More...
 
virtual ~TObject ()
 TObject destructor. More...
 
virtual void AppendPad (Option_t *option="")
 Append graphics object to current pad. More...
 
virtual void Browse (TBrowser *b)
 Browse object. May be overridden for another default action. More...
 
virtual const char * ClassName () const
 Returns name of class to which the object belongs. More...
 
virtual void Clear (Option_t *="")
 
virtual TObjectClone (const char *newname="") const
 Make a clone of an object using the Streamer facility. More...
 
virtual Int_t Compare (const TObject *obj) const
 Compare abstract method. More...
 
virtual void Copy (TObject &object) const
 Copy this to obj. More...
 
virtual void Delete (Option_t *option="")
 Delete this object. More...
 
virtual Int_t DistancetoPrimitive (Int_t px, Int_t py)
 Computes distance from point (px,py) to the object. More...
 
virtual void Draw (Option_t *option="")
 Default Draw method for all objects. More...
 
virtual void DrawClass () const
 Draw class inheritance tree of the class to which this object belongs. More...
 
virtual TObjectDrawClone (Option_t *option="") const
 Draw a clone of this object in the current pad. More...
 
virtual void Dump () const
 Dump contents of object on stdout. More...
 
virtual void Execute (const char *method, const char *params, Int_t *error=0)
 Execute method on this object with the given parameter string, e.g. More...
 
virtual void Execute (TMethod *method, TObjArray *params, Int_t *error=0)
 Execute method on this object with parameters stored in the TObjArray. More...
 
virtual void ExecuteEvent (Int_t event, Int_t px, Int_t py)
 Execute action corresponding to an event at (px,py). More...
 
virtual TObjectFindObject (const char *name) const
 Must be redefined in derived classes. More...
 
virtual TObjectFindObject (const TObject *obj) const
 Must be redefined in derived classes. More...
 
virtual Option_tGetDrawOption () const
 Get option used by the graphics system to draw this object. More...
 
virtual UInt_t GetUniqueID () const
 Return the unique object id. More...
 
virtual const char * GetName () const
 Returns name of object. More...
 
virtual const char * GetIconName () const
 Returns mime type name of object. More...
 
virtual Option_tGetOption () const
 
virtual char * GetObjectInfo (Int_t px, Int_t py) const
 Returns string containing info about the object at position (px,py). More...
 
virtual const char * GetTitle () const
 Returns title of object. More...
 
virtual Bool_t HandleTimer (TTimer *timer)
 Execute action in response of a timer timing out. More...
 
virtual ULong_t Hash () const
 Return hash value for this object. More...
 
virtual Bool_t InheritsFrom (const char *classname) const
 Returns kTRUE if object inherits from class "classname". More...
 
virtual Bool_t InheritsFrom (const TClass *cl) const
 Returns kTRUE if object inherits from TClass cl. More...
 
virtual void Inspect () const
 Dump contents of this object in a graphics canvas. More...
 
virtual Bool_t IsFolder () const
 Returns kTRUE in case object contains browsable objects (like containers or lists of other objects). More...
 
virtual Bool_t IsEqual (const TObject *obj) const
 Default equal comparison (objects are equal if they have the same address in memory). More...
 
virtual Bool_t IsSortable () const
 
Bool_t IsOnHeap () const
 
Bool_t IsZombie () const
 
virtual Bool_t Notify ()
 This method must be overridden to handle object notification. More...
 
virtual void ls (Option_t *option="") const
 The ls function lists the contents of a class on stdout. More...
 
virtual void Paint (Option_t *option="")
 This method must be overridden if a class wants to paint itself. More...
 
virtual void Pop ()
 Pop on object drawn in a pad to the top of the display list. More...
 
virtual void Print (Option_t *option="") const
 This method must be overridden when a class wants to print itself. More...
 
virtual Int_t Read (const char *name)
 Read contents of object with specified name from the current directory. More...
 
virtual void RecursiveRemove (TObject *obj)
 Recursively remove this object from a list. More...
 
virtual void SaveAs (const char *filename="", Option_t *option="") const
 Save this object in the file specified by filename. More...
 
virtual void SavePrimitive (std::ostream &out, Option_t *option="")
 Save a primitive as a C++ statement(s) on output stream "out". More...
 
virtual void SetDrawOption (Option_t *option="")
 Set drawing option for object. More...
 
virtual void SetUniqueID (UInt_t uid)
 Set the unique object id. More...
 
virtual void UseCurrentStyle ()
 Set current style settings in this object This function is called when either TCanvas::UseCurrentStyle or TROOT::ForceStyle have been invoked. More...
 
virtual Int_t Write (const char *name=0, Int_t option=0, Int_t bufsize=0)
 Write this object to the current directory. More...
 
virtual Int_t Write (const char *name=0, Int_t option=0, Int_t bufsize=0) const
 Write this object to the current directory. More...
 
voidoperator new (size_t sz)
 
voidoperator new[] (size_t sz)
 
voidoperator new (size_t sz, void *vp)
 
voidoperator new[] (size_t sz, void *vp)
 
void operator delete (void *ptr)
 Operator delete. More...
 
void operator delete[] (void *ptr)
 Operator delete []. More...
 
void SetBit (UInt_t f, Bool_t set)
 Set or unset the user status bits as specified in f. More...
 
void SetBit (UInt_t f)
 
void ResetBit (UInt_t f)
 
Bool_t TestBit (UInt_t f) const
 
Int_t TestBits (UInt_t f) const
 
void InvertBit (UInt_t f)
 
virtual void Info (const char *method, const char *msgfmt,...) const
 Issue info message. More...
 
virtual void Warning (const char *method, const char *msgfmt,...) const
 Issue warning message. More...
 
virtual void Error (const char *method, const char *msgfmt,...) const
 Issue error message. More...
 
virtual void SysError (const char *method, const char *msgfmt,...) const
 Issue system error message. More...
 
virtual void Fatal (const char *method, const char *msgfmt,...) const
 Issue fatal error message. More...
 
void AbstractMethod (const char *method) const
 Use this method to implement an "abstract" method that you don't want to leave purely abstract. More...
 
void MayNotUse (const char *method) const
 Use this method to signal that a method (defined in a base class) may not be called in a derived class (in principle against good design since a child class should not provide less functionality than its parent, however, sometimes it is necessary). More...
 
void Obsolete (const char *method, const char *asOfVers, const char *removedFromVers) const
 Use this method to declare a method obsolete. More...
 

Protected Member Functions

char * Makestr (const char *str)
 creates char* variable with copy of provided string More...
 
char * Makenstr (const char *start, int len)
 creates char* variable with copy of len symbols from provided string More...
 
XMLNodePointer_t AllocateNode (int namelen, XMLNodePointer_t parent)
 Allocates new xml node with specified namelength. More...
 
XMLAttrPointer_t AllocateAttr (int namelen, int valuelen, XMLNodePointer_t xmlnode)
 Allocate new attribute with specified name length and value length. More...
 
XMLNsPointer_t FindNs (XMLNodePointer_t xmlnode, const char *nsname)
 define if namespace of that name exists for xmlnode More...
 
void TruncateNsExtension (XMLNodePointer_t xmlnode)
 removes namespace extension of nodename More...
 
void UnpackSpecialCharacters (char *target, const char *source, int srclen)
 unpack special symbols, used in xml syntax to code characters these symbols: '<' - &lt, '>' - &gt, '&' - &amp, '"' - &quot, ''' - &apos More...
 
void OutputValue (char *value, TXMLOutputStream *out)
 output value to output stream if symbols '<' '&' '>' '"' ''' appears in the string, they will be encoded to appropriate xml symbols: &lt, &amp, &gt, &quot, &apos More...
 
void SaveNode (XMLNodePointer_t xmlnode, TXMLOutputStream *out, Int_t layout, Int_t level)
 stream data of xmlnode to output More...
 
XMLNodePointer_t ReadNode (XMLNodePointer_t xmlparent, TXMLInputStream *inp, Int_t &resvalue)
 Tries to construct xml node from input stream. More...
 
void DisplayError (Int_t error, Int_t linenumber)
 Displays xml parsing error. More...
 
XMLDocPointer_t ParseStream (TXMLInputStream *input)
 parses content of the stream and tries to produce xml structures More...
 
- Protected Member Functions inherited from TObject
void MakeZombie ()
 
virtual void DoError (int level, const char *location, const char *fmt, va_list va) const
 Interface to ErrorHandler (protected). More...
 

Protected Attributes

Bool_t fSkipComments
 

Additional Inherited Members

- Public Types inherited from TObject
enum  EStatusBits {
  kCanDelete = BIT(0), kMustCleanup = BIT(3), kObjInCanvas = BIT(3), kIsReferenced = BIT(4),
  kHasUUID = BIT(5), kCannotPick = BIT(6), kNoContextMenu = BIT(8), kInvalidObject = BIT(13)
}
 
enum  { kIsOnHeap = 0x01000000, kNotDeleted = 0x02000000, kZombie = 0x04000000, kBitMask = 0x00ffffff }
 
enum  { kSingleKey = BIT(0), kOverwrite = BIT(1), kWriteDelete = BIT(2) }
 
- Static Public Member Functions inherited from TObject
static Long_t GetDtorOnly ()
 Return destructor only flag. More...
 
static void SetDtorOnly (void *obj)
 Set destructor only flag. More...
 
static Bool_t GetObjectStat ()
 Get status of object stat flag. More...
 
static void SetObjectStat (Bool_t stat)
 Turn on/off tracking of objects in the TObjectTable. More...
 

#include <TXMLEngine.h>

+ Inheritance diagram for TXMLEngine:
+ Collaboration diagram for TXMLEngine:

Constructor & Destructor Documentation

TXMLEngine::TXMLEngine ( )

if true, do not create comments nodes in document during parsing

default (normal) constructor of TXMLEngine class

Definition at line 430 of file TXMLEngine.cxx.

TXMLEngine::~TXMLEngine ( )
virtual

destructor for TXMLEngine object

Definition at line 439 of file TXMLEngine.cxx.

Member Function Documentation

void TXMLEngine::AddChild ( XMLNodePointer_t  parent,
XMLNodePointer_t  child 
)
void TXMLEngine::AddChildFirst ( XMLNodePointer_t  parent,
XMLNodePointer_t  child 
)

add node as first child

Definition at line 717 of file TXMLEngine.cxx.

Referenced by SetNodeContent(), and TKeyXML::StoreObject().

Bool_t TXMLEngine::AddComment ( XMLNodePointer_t  parent,
const char *  comment 
)

Adds comment line to the node.

Definition at line 734 of file TXMLEngine.cxx.

Referenced by TMVA::Tools::AddComment(), and AddDocComment().

Bool_t TXMLEngine::AddDocComment ( XMLDocPointer_t  xmldoc,
const char *  comment 
)

add comment line to the top of the document

Definition at line 750 of file TXMLEngine.cxx.

Referenced by TXMLFile::AddXmlComment().

Bool_t TXMLEngine::AddDocRawLine ( XMLDocPointer_t  xmldoc,
const char *  line 
)

Add just line on the top of xml document Line should has correct xml syntax that later it can be decoded by xml parser.

Definition at line 785 of file TXMLEngine.cxx.

Referenced by TXMLFile::AddXmlLine().

Bool_t TXMLEngine::AddDocStyleSheet ( XMLDocPointer_t  xmldoc,
const char *  href,
const char *  type = "text/css",
const char *  title = 0,
int  alternate = -1,
const char *  media = 0,
const char *  charset = 0 
)

Add style sheet definition on the top of document.

Definition at line 843 of file TXMLEngine.cxx.

Referenced by TXMLFile::AddXmlStyleSheet().

void TXMLEngine::AddNodeContent ( XMLNodePointer_t  xmlnode,
const char *  content,
Int_t  len = 0 
)

add new content of the xml node old content will be preserved, one could mix content with child nodes

Definition at line 977 of file TXMLEngine.cxx.

Referenced by ReadNode().

Bool_t TXMLEngine::AddRawLine ( XMLNodePointer_t  parent,
const char *  line 
)

Add just line into xml file Line should has correct xml syntax that later it can be decoded by xml parser For instance, it can be comment or processing instructions.

Definition at line 769 of file TXMLEngine.cxx.

Referenced by AddDocRawLine(), and TMVA::MethodANNBase::AddWeightsXMLTo().

Bool_t TXMLEngine::AddStyleSheet ( XMLNodePointer_t  parent,
const char *  href,
const char *  type = "text/css",
const char *  title = 0,
int  alternate = -1,
const char *  media = 0,
const char *  charset = 0 
)

Adds style sheet definition to the specified node Creates <?xml-stylesheet alternate="yes" title="compact" href="small-base.css" type="text/css"?> Attributes href and type must be supplied, other attributes: title, alternate, media, charset are optional if alternate==0, attribyte alternate="no" will be created, if alternate>0, attribute alternate="yes" if alternate<0, attribute will not be created.

Definition at line 808 of file TXMLEngine.cxx.

Referenced by AddDocStyleSheet().

XMLAttrPointer_t TXMLEngine::AllocateAttr ( int  namelen,
int  valuelen,
XMLNodePointer_t  xmlnode 
)
protected

Allocate new attribute with specified name length and value length.

Definition at line 1359 of file TXMLEngine.cxx.

Referenced by NewAttr(), and ReadNode().

XMLNodePointer_t TXMLEngine::AllocateNode ( int  namelen,
XMLNodePointer_t  parent 
)
protected

Allocates new xml node with specified namelength.

Definition at line 1336 of file TXMLEngine.cxx.

Referenced by AddComment(), AddNodeContent(), AddRawLine(), AddStyleSheet(), NewChild(), ReadNode(), and SetNodeContent().

void TXMLEngine::AssignDtd ( XMLDocPointer_t  xmldoc,
const char *  dtdname,
const char *  rootname 
)

assignes dtd filename to document

Definition at line 1118 of file TXMLEngine.cxx.

TXMLEngine::ClassDef ( TXMLEngine  ,
 
)
void TXMLEngine::CleanNode ( XMLNodePointer_t  xmlnode)

remove all children node from xmlnode

Definition at line 1080 of file TXMLEngine.cxx.

Referenced by TXMLFile::ReadFromFile().

void TXMLEngine::DisplayError ( Int_t  error,
Int_t  linenumber 
)
protected

Displays xml parsing error.

Definition at line 1893 of file TXMLEngine.cxx.

Referenced by ParseStream(), and ReadSingleNode().

XMLNodePointer_t TXMLEngine::DocGetRootElement ( XMLDocPointer_t  xmldoc)
void TXMLEngine::DocSetRootElement ( XMLDocPointer_t  xmldoc,
XMLNodePointer_t  xmlnode 
)

set main (root) node for document

Definition at line 1168 of file TXMLEngine.cxx.

Referenced by TXMLFile::InitXmlFile(), and TMVA::MethodBase::WriteStateToFile().

XMLNsPointer_t TXMLEngine::FindNs ( XMLNodePointer_t  xmlnode,
const char *  nsname 
)
protected

define if namespace of that name exists for xmlnode

Definition at line 1383 of file TXMLEngine.cxx.

Referenced by ReadNode().

void TXMLEngine::FreeAllAttr ( XMLNodePointer_t  xmlnode)

Free all attributes of the node.

Definition at line 550 of file TXMLEngine.cxx.

Referenced by TKeyXML::UpdateAttributes(), and TKeyXML::UpdateObject().

void TXMLEngine::FreeAttr ( XMLNodePointer_t  xmlnode,
const char *  name 
)

remove attribute from xmlnode

Definition at line 526 of file TXMLEngine.cxx.

Referenced by TBufferXML::PerformPreProcessing(), and TXMLFile::SaveToFile().

void TXMLEngine::FreeDoc ( XMLDocPointer_t  xmldoc)
void TXMLEngine::FreeNode ( XMLNodePointer_t  xmlnode)
const char * TXMLEngine::GetAttr ( XMLNodePointer_t  xmlnode,
const char *  name 
)
const char * TXMLEngine::GetAttrName ( XMLAttrPointer_t  xmlattr)
const char * TXMLEngine::GetAttrValue ( XMLAttrPointer_t  xmlattr)
XMLNodePointer_t TXMLEngine::GetChild ( XMLNodePointer_t  xmlnode,
Bool_t  realnode = kTRUE 
)
XMLAttrPointer_t TXMLEngine::GetFirstAttr ( XMLNodePointer_t  xmlnode)
Int_t TXMLEngine::GetIntAttr ( XMLNodePointer_t  node,
const char *  name 
)

returns value of attribute as integer

Definition at line 475 of file TXMLEngine.cxx.

Referenced by TXMLFile::ReadFromFile(), TXMLFile::ReadStreamerElement(), TBufferXML::ReadVersion(), TKeyXML::TKeyXML(), and TBufferXML::XmlReadBlock().

XMLNodePointer_t TXMLEngine::GetNext ( XMLNodePointer_t  xmlnode,
Bool_t  realnode = kTRUE 
)
XMLAttrPointer_t TXMLEngine::GetNextAttr ( XMLAttrPointer_t  xmlattr)
const char * TXMLEngine::GetNodeContent ( XMLNodePointer_t  xmlnode)

get contents (if any) of xml node

Definition at line 938 of file TXMLEngine.cxx.

Referenced by TMVA::MethodANNBase::ReadWeightsFromXML(), and TBufferXML::XmlReadBlock().

const char * TXMLEngine::GetNodeName ( XMLNodePointer_t  xmlnode)
XMLNsPointer_t TXMLEngine::GetNS ( XMLNodePointer_t  xmlnode)

return namespace attribute (if exists)

Definition at line 665 of file TXMLEngine.cxx.

const char * TXMLEngine::GetNSName ( XMLNsPointer_t  ns)

return name id of namespace

Definition at line 676 of file TXMLEngine.cxx.

const char * TXMLEngine::GetNSReference ( XMLNsPointer_t  ns)

return reference id of namespace

Definition at line 688 of file TXMLEngine.cxx.

XMLNodePointer_t TXMLEngine::GetParent ( XMLNodePointer_t  xmlnode)

returns parent of xmlnode

Definition at line 1004 of file TXMLEngine.cxx.

Referenced by TGDMLParse::ParseGDML().

Bool_t TXMLEngine::GetSkipComments ( ) const
inline

Definition at line 51 of file TXMLEngine.h.

Bool_t TXMLEngine::HasAttr ( XMLNodePointer_t  xmlnode,
const char *  name 
)
Bool_t TXMLEngine::IsCommentNode ( XMLNodePointer_t  xmlnode)

return kTRUE is this is special node with content

Definition at line 1062 of file TXMLEngine.cxx.

Bool_t TXMLEngine::IsContentNode ( XMLNodePointer_t  xmlnode)

return kTRUE is this is special node with content

Definition at line 1054 of file TXMLEngine.cxx.

Bool_t TXMLEngine::IsEmptyNode ( XMLNodePointer_t  xmlnode)

return kTRUE is this is node with special data like comments to data processing instructions

Definition at line 1046 of file TXMLEngine.cxx.

Referenced by SkipEmpty().

Bool_t TXMLEngine::IsXmlNode ( XMLNodePointer_t  xmlnode)

return kTRUE is this is normal xml node

Definition at line 1038 of file TXMLEngine.cxx.

char * TXMLEngine::Makenstr ( const char *  start,
int  len 
)
protected

creates char* variable with copy of len symbols from provided string

Definition at line 1324 of file TXMLEngine.cxx.

char * TXMLEngine::Makestr ( const char *  str)
protected

creates char* variable with copy of provided string

Definition at line 1311 of file TXMLEngine.cxx.

Referenced by AssignDtd().

XMLAttrPointer_t TXMLEngine::NewAttr ( XMLNodePointer_t  xmlnode,
XMLNsPointer_t  ,
const char *  name,
const char *  value 
)
XMLNodePointer_t TXMLEngine::NewChild ( XMLNodePointer_t  parent,
XMLNsPointer_t  ns,
const char *  name,
const char *  content = 0 
)
XMLDocPointer_t TXMLEngine::NewDoc ( const char *  version = "1.0")

creates new xml document with provided version

Definition at line 1099 of file TXMLEngine.cxx.

Referenced by TXMLFile::InitXmlFile(), ParseStream(), and TMVA::MethodBase::WriteStateToFile().

XMLAttrPointer_t TXMLEngine::NewIntAttr ( XMLNodePointer_t  xmlnode,
const char *  name,
Int_t  value 
)
XMLNsPointer_t TXMLEngine::NewNS ( XMLNodePointer_t  xmlnode,
const char *  reference,
const char *  name = 0 
)

create namespace attribute for xmlnode.

namespace attribute will be always the first in list of node attributes

Definition at line 641 of file TXMLEngine.cxx.

Referenced by TBufferXML::WorkWithClass().

void TXMLEngine::OutputValue ( char *  value,
TXMLOutputStream *  out 
)
protected

output value to output stream if symbols '<' '&' '>' '"' ''' appears in the string, they will be encoded to appropriate xml symbols: &lt, &amp, &gt, &quot, &apos

Definition at line 1450 of file TXMLEngine.cxx.

Referenced by SaveNode().

XMLDocPointer_t TXMLEngine::ParseFile ( const char *  filename,
Int_t  maxbuf = 100000 
)

Parses content of file and tries to produce xml structures.

The maxbuf argument specifies the max size of the XML file to be parsed. The default value is 100000.

Definition at line 1196 of file TXMLEngine.cxx.

Referenced by ClassImp(), TMVA::Reader::GetMethodTypeFromFile(), TMVA::StatDialogBDTReg::GetNtrees(), TMVA::StatDialogBDT::GetNtrees(), TAlienCollection::ParseXML(), TXMLFile::ReadFromFile(), ReadNode(), TMVA::MethodBase::ReadStateFromFile(), TMVA::StatDialogBDTReg::ReadTree(), TMVA::StatDialogBDT::ReadTree(), and TGDMLParse::VolProcess().

XMLDocPointer_t TXMLEngine::ParseStream ( TXMLInputStream *  input)
protected

parses content of the stream and tries to produce xml structures

Definition at line 1217 of file TXMLEngine.cxx.

Referenced by ParseFile(), and ParseString().

XMLDocPointer_t TXMLEngine::ParseString ( const char *  xmlstring)

parses content of string and tries to produce xml structures

Definition at line 1207 of file TXMLEngine.cxx.

Referenced by TMVA::MethodBase::ReadStateFromXMLString().

XMLNodePointer_t TXMLEngine::ReadNode ( XMLNodePointer_t  xmlparent,
TXMLInputStream *  inp,
Int_t resvalue 
)
protected

Tries to construct xml node from input stream.

Node should be child of xmlparent node or it can be closing tag of xmlparent. resvalue <= 0 if error resvalue == 1 if this is endnode of parent resvalue == 2 if this is child

Definition at line 1567 of file TXMLEngine.cxx.

Referenced by ParseStream(), and ReadSingleNode().

XMLNodePointer_t TXMLEngine::ReadSingleNode ( const char *  src)

read single xml node from provided string

Definition at line 1289 of file TXMLEngine.cxx.

Referenced by TBufferXML::ConvertFromXMLAny().

void TXMLEngine::SaveDoc ( XMLDocPointer_t  xmldoc,
const char *  filename,
Int_t  layout = 1 
)

store document content to file if layout<=0, no any spaces or newlines will be placed between xmlnodes.

Xml file will have minimum size, but nonreadable structure if (layout>0) each node will be started from new line, and number of spaces will correspond to structure depth.

Definition at line 1148 of file TXMLEngine.cxx.

Referenced by TXMLFile::SaveToFile(), and TMVA::MethodBase::WriteStateToFile().

void TXMLEngine::SaveNode ( XMLNodePointer_t  xmlnode,
TXMLOutputStream *  out,
Int_t  layout,
Int_t  level 
)
protected

stream data of xmlnode to output

Definition at line 1475 of file TXMLEngine.cxx.

Referenced by SaveDoc(), and SaveSingleNode().

void TXMLEngine::SaveSingleNode ( XMLNodePointer_t  xmlnode,
TString res,
Int_t  layout = 1 
)

convert single xml node (and its child node) to string if layout<=0, no any spaces or newlines will be placed between xmlnodes.

Xml file will have minimum size, but nonreadable structure if (layout>0) each node will be started from new line, and number of spaces will correspond to structure depth.

Definition at line 1277 of file TXMLEngine.cxx.

Referenced by TBufferXML::ConvertToXML().

void TXMLEngine::SetNodeContent ( XMLNodePointer_t  xmlnode,
const char *  content,
Int_t  len = 0 
)

set content of the xml node if old node content was exists, it will be replaced

Definition at line 953 of file TXMLEngine.cxx.

void TXMLEngine::SetSkipComments ( Bool_t  on = kTRUE)
inline

Definition at line 50 of file TXMLEngine.h.

Referenced by ClassImp(), TGDMLParse::VolProcess(), and TGDMLWrite::WriteGDMLfile().

void TXMLEngine::ShiftToNext ( XMLNodePointer_t xmlnode,
Bool_t  realnode = kTRUE 
)

shifts specified node to next if realnode==kTRUE, any special nodes in between will be skipped

Definition at line 1027 of file TXMLEngine.cxx.

Referenced by GetChild(), TXMLFile::GetStreamerInfoList(), TGDMLParse::ParseGDML(), TBufferXML::PerformPostProcessing(), TXMLFile::ReadFromFile(), ReadNode(), SaveDoc(), TBufferXML::ShiftStack(), SkipEmpty(), and TKeyXML::XmlReadAny().

void TXMLEngine::SkipEmpty ( XMLNodePointer_t xmlnode)
void TXMLEngine::TruncateNsExtension ( XMLNodePointer_t  xmlnode)
protected

removes namespace extension of nodename

Definition at line 1399 of file TXMLEngine.cxx.

Referenced by ReadNode().

void TXMLEngine::UnlinkFreeNode ( XMLNodePointer_t  xmlnode)

combined operation. Unlink node and free used memory

Definition at line 921 of file TXMLEngine.cxx.

Referenced by TBufferXML::PerformPostProcessing(), and SetNodeContent().

void TXMLEngine::UnlinkNode ( XMLNodePointer_t  node)
void TXMLEngine::UnpackSpecialCharacters ( char *  target,
const char *  source,
int  srclen 
)
protected

unpack special symbols, used in xml syntax to code characters these symbols: '<' - &lt, '>' - &gt, '&' - &amp, '"' - &quot, ''' - &apos

Definition at line 1416 of file TXMLEngine.cxx.

Referenced by ReadNode().

Bool_t TXMLEngine::ValidateDocument ( XMLDocPointer_t  ,
Bool_t  = kFALSE 
)
inline

Definition at line 117 of file TXMLEngine.h.

Referenced by TXMLFile::ReadFromFile().

Bool_t TXMLEngine::ValidateVersion ( XMLDocPointer_t  doc,
const char *  version = 0 
)

check that first node is xml processing instruction with correct xml version number

Definition at line 1253 of file TXMLEngine.cxx.

Referenced by TXMLFile::ReadFromFile().

Member Data Documentation

Bool_t TXMLEngine::fSkipComments
protected

Definition at line 44 of file TXMLEngine.h.

Referenced by GetSkipComments(), ReadNode(), and TXMLEngine().


The documentation for this class was generated from the following files: