Logo ROOT  
Reference Guide
TXMLEngine Class Reference

Definition at line 26 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 AddChild (XMLNodePointer_t parent, XMLNodePointer_t child)
 add child element to xmlnode More...
 
void AddChildAfter (XMLNodePointer_t parent, XMLNodePointer_t child, XMLNodePointer_t afternode)
 Insert new child node after already existing node. 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 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 AddDocStyleSheet (XMLDocPointer_t xmldoc, const char *href, const char *type="text/css", const char *title=nullptr, int alternate=-1, const char *media=nullptr, const char *charset=nullptr)
 Add style sheet definition on the top of document. More...
 
void AddNodeContent (XMLNodePointer_t xmlnode, const char *content, Int_t len=0)
 add new content of the xmlnode old content will be preserved, one could mix content with child nodes 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 AddStyleSheet (XMLNodePointer_t parent, const char *href, const char *type="text/css", const char *title=nullptr, int alternate=-1, const char *media=nullptr, const char *charset=nullptr)
 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, attribute alternate="no" will be created, if alternate>0, attribute alternate="yes" if alternate<0, attribute will not be created. More...
 
void AssignDtd (XMLDocPointer_t xmldoc, const char *dtdname, const char *rootname)
 assigns dtd filename to document More...
 
void CleanNode (XMLNodePointer_t xmlnode)
 remove all children node from xmlnode More...
 
XMLNodePointer_t DocGetRootElement (XMLDocPointer_t xmldoc)
 returns root node of document More...
 
void DocSetRootElement (XMLDocPointer_t xmldoc, XMLNodePointer_t xmlnode)
 set main (root) node for document More...
 
void FreeAllAttr (XMLNodePointer_t xmlnode)
 Free all attributes of the node. More...
 
void FreeAttr (XMLNodePointer_t xmlnode, const char *name)
 remove attribute from xmlnode More...
 
void FreeDoc (XMLDocPointer_t xmldoc)
 frees allocated document data and deletes document itself More...
 
void FreeNode (XMLNodePointer_t xmlnode)
 release all memory, allocated from this node and destroys node itself More...
 
const char * GetAttr (XMLNodePointer_t xmlnode, const char *name)
 returns value of attribute for xmlnode 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 GetChild (XMLNodePointer_t xmlnode, Bool_t realnode=kTRUE)
 returns first child of xmlnode More...
 
XMLAttrPointer_t GetFirstAttr (XMLNodePointer_t xmlnode)
 return first attribute in the list, namespace (if exists) will be skipped More...
 
Int_t GetIntAttr (XMLNodePointer_t node, const char *name)
 returns value of attribute as integer 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...
 
XMLAttrPointer_t GetNextAttr (XMLAttrPointer_t xmlattr)
 return next attribute in the list More...
 
const char * GetNodeContent (XMLNodePointer_t xmlnode)
 get contents (if any) of xmlnode More...
 
const char * GetNodeName (XMLNodePointer_t xmlnode)
 returns name of 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...
 
XMLNodePointer_t GetParent (XMLNodePointer_t xmlnode)
 returns parent of xmlnode More...
 
Bool_t GetSkipComments () const
 
Bool_t HasAttr (XMLNodePointer_t xmlnode, const char *name)
 checks if node has attribute of specified name More...
 
Bool_t IsCommentNode (XMLNodePointer_t xmlnode)
 return kTRUE is this is special node with content More...
 
Bool_t IsContentNode (XMLNodePointer_t xmlnode)
 return kTRUE is this is special node with content 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 IsXmlNode (XMLNodePointer_t xmlnode)
 return kTRUE is this is normal xmlnode 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...
 
XMLNodePointer_t NewChild (XMLNodePointer_t parent, XMLNsPointer_t ns, const char *name, const char *content=nullptr)
 create new child element for parent node More...
 
XMLDocPointer_t NewDoc (const char *version="1.0")
 creates new xml document with provided version More...
 
XMLAttrPointer_t NewIntAttr (XMLNodePointer_t xmlnode, const char *name, Int_t value)
 create node attribute with integer value More...
 
XMLNsPointer_t NewNS (XMLNodePointer_t xmlnode, const char *reference, const char *name=nullptr)
 create namespace attribute for xmlnode. 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...
 
XMLNodePointer_t ReadSingleNode (const char *src)
 read single xmlnode from provided string 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 SaveSingleNode (XMLNodePointer_t xmlnode, TString *res, Int_t layout=1)
 convert single xmlnode (and its child node) to string if layout<=0, no any spaces or newlines will be placed between xmlnodes. More...
 
void SetNodeContent (XMLNodePointer_t xmlnode, const char *content, Int_t len=0)
 set content of the xmlnode if old node content was exists, it will be replaced More...
 
void SetSkipComments (Bool_t on=kTRUE)
 
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...
 
void SkipEmpty (XMLNodePointer_t &xmlnode)
 Skip all current empty nodes and locate on first "true" node. More...
 
void UnlinkFreeNode (XMLNodePointer_t xmlnode)
 combined operation. Unlink node and free used memory More...
 
void UnlinkNode (XMLNodePointer_t node)
 unlink (detach) xmlnode from parent More...
 
Bool_t ValidateDocument (XMLDocPointer_t, Bool_t=kFALSE)
 
Bool_t ValidateVersion (XMLDocPointer_t doc, const char *version=nullptr)
 check that first node is xml processing instruction with correct xml version number More...
 
- Public Member Functions inherited from TObject
 TObject ()
 TObject constructor. More...
 
 TObject (const TObject &object)
 TObject copy ctor. More...
 
virtual ~TObject ()
 TObject destructor. 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...
 
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...
 
ULong_t CheckedHash ()
 Check and record whether this class has a consistent Hash/RecursiveRemove setup (*) and then return the regular Hash value for this object. 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 selected pad for instance with: gROOT->SetSelectedPad(gPad). More...
 
virtual void Dump () const
 Dump contents of object on stdout. More...
 
virtual void Error (const char *method, const char *msgfmt,...) const
 Issue error message. 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 void Fatal (const char *method, const char *msgfmt,...) const
 Issue fatal error message. 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 const char * GetIconName () const
 Returns mime type name of object. More...
 
virtual const char * GetName () const
 Returns name of object. More...
 
virtual char * GetObjectInfo (Int_t px, Int_t py) const
 Returns string containing info about the object at position (px,py). More...
 
virtual Option_tGetOption () const
 
virtual const char * GetTitle () const
 Returns title of object. More...
 
virtual UInt_t GetUniqueID () const
 Return the unique object id. 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...
 
Bool_t HasInconsistentHash () const
 Return true is the type of this object is known to have an inconsistent setup for Hash and RecursiveRemove (i.e. More...
 
virtual void Info (const char *method, const char *msgfmt,...) const
 Issue info message. 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...
 
void InvertBit (UInt_t f)
 
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 IsFolder () const
 Returns kTRUE in case object contains browsable objects (like containers or lists of other objects). More...
 
R__ALWAYS_INLINE Bool_t IsOnHeap () const
 
virtual Bool_t IsSortable () const
 
R__ALWAYS_INLINE Bool_t IsZombie () const
 
virtual void ls (Option_t *option="") const
 The ls function lists the contents of a class on stdout. 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...
 
virtual Bool_t Notify ()
 This method must be overridden to handle object notification. More...
 
void Obsolete (const char *method, const char *asOfVers, const char *removedFromVers) const
 Use this method to declare a method obsolete. More...
 
void operator delete (void *ptr)
 Operator delete. More...
 
void operator delete[] (void *ptr)
 Operator delete []. More...
 
voidoperator new (size_t sz)
 
voidoperator new (size_t sz, void *vp)
 
voidoperator new[] (size_t sz)
 
voidoperator new[] (size_t sz, void *vp)
 
TObjectoperator= (const TObject &rhs)
 TObject assignment operator. 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...
 
void ResetBit (UInt_t f)
 
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...
 
void SetBit (UInt_t f)
 
void SetBit (UInt_t f, Bool_t set)
 Set or unset the user status bits as specified in f. 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 SysError (const char *method, const char *msgfmt,...) const
 Issue system error message. More...
 
R__ALWAYS_INLINE Bool_t TestBit (UInt_t f) const
 
Int_t TestBits (UInt_t f) const
 
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 void Warning (const char *method, const char *msgfmt,...) const
 Issue warning message. 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...
 

Protected Member Functions

XMLAttrPointer_t AllocateAttr (int namelen, int valuelen, XMLNodePointer_t xmlnode)
 Allocate new attribute with specified name length and value length. More...
 
XMLNodePointer_t AllocateNode (int namelen, XMLNodePointer_t parent)
 Allocates new xml node with specified name length. More...
 
void DisplayError (Int_t error, Int_t linenumber)
 Displays xml parsing error. More...
 
XMLNsPointer_t FindNs (XMLNodePointer_t xmlnode, const char *nsname)
 define if namespace of that name exists for xmlnode More...
 
char * Makenstr (const char *start, int len)
 creates char* variable with copy of len symbols from provided string More...
 
char * Makestr (const char *str)
 creates char* variable with copy of provided string 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...
 
XMLDocPointer_t ParseStream (TXMLInputStream *input)
 parses content of the stream and tries to produce xml structures More...
 
XMLNodePointer_t ReadNode (XMLNodePointer_t xmlparent, TXMLInputStream *inp, Int_t &resvalue)
 Tries to construct xml node from input stream. More...
 
void SaveNode (XMLNodePointer_t xmlnode, TXMLOutputStream *out, Int_t layout, Int_t level)
 stream data of xmlnode to output 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...
 
- Protected Member Functions inherited from TObject
virtual void DoError (int level, const char *location, const char *fmt, va_list va) const
 Interface to ErrorHandler (protected). More...
 
void MakeZombie ()
 

Protected Attributes

Bool_t fSkipComments
 

Additional Inherited Members

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

#include <TXMLEngine.h>

Inheritance diagram for TXMLEngine:
[legend]

Constructor & Destructor Documentation

◆ TXMLEngine()

TXMLEngine::TXMLEngine ( )

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

default (normal) constructor of TXMLEngine class

Definition at line 518 of file TXMLEngine.cxx.

◆ ~TXMLEngine()

TXMLEngine::~TXMLEngine ( )
virtual

destructor for TXMLEngine object

Definition at line 526 of file TXMLEngine.cxx.

Member Function Documentation

◆ AddChild()

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

add child element to xmlnode

Definition at line 793 of file TXMLEngine.cxx.

◆ AddChildAfter()

void TXMLEngine::AddChildAfter ( XMLNodePointer_t  parent,
XMLNodePointer_t  child,
XMLNodePointer_t  afternode 
)

Insert new child node after already existing node.

Definition at line 840 of file TXMLEngine.cxx.

◆ AddChildFirst()

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

add node as first child

Definition at line 818 of file TXMLEngine.cxx.

◆ AddComment()

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

Adds comment line to the node.

Definition at line 872 of file TXMLEngine.cxx.

◆ AddDocComment()

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

add comment line to the top of the document

Definition at line 889 of file TXMLEngine.cxx.

◆ AddDocRawLine()

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 926 of file TXMLEngine.cxx.

◆ AddDocStyleSheet()

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

Add style sheet definition on the top of document.

Definition at line 980 of file TXMLEngine.cxx.

◆ AddNodeContent()

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

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

Definition at line 1122 of file TXMLEngine.cxx.

◆ AddRawLine()

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 909 of file TXMLEngine.cxx.

◆ AddStyleSheet()

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

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, attribute alternate="no" will be created, if alternate>0, attribute alternate="yes" if alternate<0, attribute will not be created.

Definition at line 947 of file TXMLEngine.cxx.

◆ AllocateAttr()

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 1531 of file TXMLEngine.cxx.

◆ AllocateNode()

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

Allocates new xml node with specified name length.

Definition at line 1508 of file TXMLEngine.cxx.

◆ AssignDtd()

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

assigns dtd filename to document

Definition at line 1268 of file TXMLEngine.cxx.

◆ CleanNode()

void TXMLEngine::CleanNode ( XMLNodePointer_t  xmlnode)

remove all children node from xmlnode

Definition at line 1229 of file TXMLEngine.cxx.

◆ DisplayError()

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

Displays xml parsing error.

Definition at line 2216 of file TXMLEngine.cxx.

◆ DocGetRootElement()

XMLNodePointer_t TXMLEngine::DocGetRootElement ( XMLDocPointer_t  xmldoc)

returns root node of document

Definition at line 1333 of file TXMLEngine.cxx.

◆ DocSetRootElement()

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

set main (root) node for document

Definition at line 1320 of file TXMLEngine.cxx.

◆ FindNs()

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

define if namespace of that name exists for xmlnode

Definition at line 1556 of file TXMLEngine.cxx.

◆ FreeAllAttr()

void TXMLEngine::FreeAllAttr ( XMLNodePointer_t  xmlnode)

Free all attributes of the node.

Definition at line 641 of file TXMLEngine.cxx.

◆ FreeAttr()

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

remove attribute from xmlnode

Definition at line 616 of file TXMLEngine.cxx.

◆ FreeDoc()

void TXMLEngine::FreeDoc ( XMLDocPointer_t  xmldoc)

frees allocated document data and deletes document itself

Definition at line 1282 of file TXMLEngine.cxx.

◆ FreeNode()

void TXMLEngine::FreeNode ( XMLNodePointer_t  xmlnode)

release all memory, allocated from this node and destroys node itself

Definition at line 1031 of file TXMLEngine.cxx.

◆ GetAttr()

const char * TXMLEngine::GetAttr ( XMLNodePointer_t  xmlnode,
const char *  name 
)

returns value of attribute for xmlnode

Definition at line 549 of file TXMLEngine.cxx.

◆ GetAttrName()

const char * TXMLEngine::GetAttrName ( XMLAttrPointer_t  xmlattr)

return name of the attribute

Definition at line 686 of file TXMLEngine.cxx.

◆ GetAttrValue()

const char * TXMLEngine::GetAttrValue ( XMLAttrPointer_t  xmlattr)

return value of attribute

Definition at line 697 of file TXMLEngine.cxx.

◆ GetChild()

XMLNodePointer_t TXMLEngine::GetChild ( XMLNodePointer_t  xmlnode,
Bool_t  realnode = kTRUE 
)

returns first child of xmlnode

Definition at line 1140 of file TXMLEngine.cxx.

◆ GetFirstAttr()

XMLAttrPointer_t TXMLEngine::GetFirstAttr ( XMLNodePointer_t  xmlnode)

return first attribute in the list, namespace (if exists) will be skipped

Definition at line 659 of file TXMLEngine.cxx.

◆ GetIntAttr()

Int_t TXMLEngine::GetIntAttr ( XMLNodePointer_t  node,
const char *  name 
)

returns value of attribute as integer

Definition at line 565 of file TXMLEngine.cxx.

◆ GetNext()

XMLNodePointer_t TXMLEngine::GetNext ( XMLNodePointer_t  xmlnode,
Bool_t  realnode = kTRUE 
)

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

Definition at line 1161 of file TXMLEngine.cxx.

◆ GetNextAttr()

XMLAttrPointer_t TXMLEngine::GetNextAttr ( XMLAttrPointer_t  xmlattr)

return next attribute in the list

Definition at line 675 of file TXMLEngine.cxx.

◆ GetNodeContent()

const char * TXMLEngine::GetNodeContent ( XMLNodePointer_t  xmlnode)

get contents (if any) of xmlnode

Definition at line 1077 of file TXMLEngine.cxx.

◆ GetNodeName()

const char * TXMLEngine::GetNodeName ( XMLNodePointer_t  xmlnode)

returns name of xmlnode

Definition at line 1069 of file TXMLEngine.cxx.

◆ GetNS()

XMLNsPointer_t TXMLEngine::GetNS ( XMLNodePointer_t  xmlnode)

return namespace attribute (if exists)

Definition at line 760 of file TXMLEngine.cxx.

◆ GetNSName()

const char * TXMLEngine::GetNSName ( XMLNsPointer_t  ns)

return name id of namespace

Definition at line 772 of file TXMLEngine.cxx.

◆ GetNSReference()

const char * TXMLEngine::GetNSReference ( XMLNsPointer_t  ns)

return reference id of namespace

Definition at line 785 of file TXMLEngine.cxx.

◆ GetParent()

XMLNodePointer_t TXMLEngine::GetParent ( XMLNodePointer_t  xmlnode)

returns parent of xmlnode

Definition at line 1152 of file TXMLEngine.cxx.

◆ GetSkipComments()

Bool_t TXMLEngine::GetSkipComments ( ) const
inline

Definition at line 49 of file TXMLEngine.h.

◆ HasAttr()

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

checks if node has attribute of specified name

Definition at line 533 of file TXMLEngine.cxx.

◆ IsCommentNode()

Bool_t TXMLEngine::IsCommentNode ( XMLNodePointer_t  xmlnode)

return kTRUE is this is special node with content

Definition at line 1212 of file TXMLEngine.cxx.

◆ IsContentNode()

Bool_t TXMLEngine::IsContentNode ( XMLNodePointer_t  xmlnode)

return kTRUE is this is special node with content

Definition at line 1204 of file TXMLEngine.cxx.

◆ IsEmptyNode()

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 1196 of file TXMLEngine.cxx.

◆ IsXmlNode()

Bool_t TXMLEngine::IsXmlNode ( XMLNodePointer_t  xmlnode)

return kTRUE is this is normal xmlnode

Definition at line 1188 of file TXMLEngine.cxx.

◆ Makenstr()

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

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

Definition at line 1495 of file TXMLEngine.cxx.

◆ Makestr()

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

creates char* variable with copy of provided string

Definition at line 1480 of file TXMLEngine.cxx.

◆ NewAttr()

XMLAttrPointer_t TXMLEngine::NewAttr ( XMLNodePointer_t  xmlnode,
XMLNsPointer_t  ,
const char *  name,
const char *  value 
)

creates new attribute for xmlnode, namespaces are not supported for attributes

Definition at line 580 of file TXMLEngine.cxx.

◆ NewChild()

XMLNodePointer_t TXMLEngine::NewChild ( XMLNodePointer_t  parent,
XMLNsPointer_t  ns,
const char *  name,
const char *  content = nullptr 
)

create new child element for parent node

Definition at line 709 of file TXMLEngine.cxx.

◆ NewDoc()

XMLDocPointer_t TXMLEngine::NewDoc ( const char *  version = "1.0")

creates new xml document with provided version

Definition at line 1249 of file TXMLEngine.cxx.

◆ NewIntAttr()

XMLAttrPointer_t TXMLEngine::NewIntAttr ( XMLNodePointer_t  xmlnode,
const char *  name,
Int_t  value 
)

create node attribute with integer value

Definition at line 606 of file TXMLEngine.cxx.

◆ NewNS()

XMLNsPointer_t TXMLEngine::NewNS ( XMLNodePointer_t  xmlnode,
const char *  reference,
const char *  name = nullptr 
)

create namespace attribute for xmlnode.

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

Definition at line 735 of file TXMLEngine.cxx.

◆ OutputValue()

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 1636 of file TXMLEngine.cxx.

◆ ParseFile()

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 1350 of file TXMLEngine.cxx.

◆ ParseStream()

XMLDocPointer_t TXMLEngine::ParseStream ( TXMLInputStream *  input)
protected

parses content of the stream and tries to produce xml structures

Definition at line 1374 of file TXMLEngine.cxx.

◆ ParseString()

XMLDocPointer_t TXMLEngine::ParseString ( const char *  xmlstring)

parses content of string and tries to produce xml structures

Definition at line 1363 of file TXMLEngine.cxx.

◆ ReadNode()

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 1769 of file TXMLEngine.cxx.

◆ ReadSingleNode()

XMLNodePointer_t TXMLEngine::ReadSingleNode ( const char *  src)

read single xmlnode from provided string

Definition at line 1457 of file TXMLEngine.cxx.

◆ SaveDoc()

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 non-readable structure if (layout>0) each node will be started from new line, and number of spaces will correspond to structure depth.

Definition at line 1300 of file TXMLEngine.cxx.

◆ SaveNode()

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

stream data of xmlnode to output

Definition at line 1667 of file TXMLEngine.cxx.

◆ SaveSingleNode()

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

convert single xmlnode (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 non-readable structure if (layout>0) each node will be started from new line, and number of spaces will correspond to structure depth.

Definition at line 1444 of file TXMLEngine.cxx.

◆ SetNodeContent()

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

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

Definition at line 1095 of file TXMLEngine.cxx.

◆ SetSkipComments()

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

Definition at line 48 of file TXMLEngine.h.

◆ ShiftToNext()

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 1176 of file TXMLEngine.cxx.

◆ SkipEmpty()

void TXMLEngine::SkipEmpty ( XMLNodePointer_t xmlnode)

Skip all current empty nodes and locate on first "true" node.

Definition at line 1220 of file TXMLEngine.cxx.

◆ TruncateNsExtension()

void TXMLEngine::TruncateNsExtension ( XMLNodePointer_t  xmlnode)
protected

removes namespace extension of nodename

Definition at line 1573 of file TXMLEngine.cxx.

◆ UnlinkFreeNode()

void TXMLEngine::UnlinkFreeNode ( XMLNodePointer_t  xmlnode)

combined operation. Unlink node and free used memory

Definition at line 1060 of file TXMLEngine.cxx.

◆ UnlinkNode()

void TXMLEngine::UnlinkNode ( XMLNodePointer_t  node)

unlink (detach) xmlnode from parent

Definition at line 999 of file TXMLEngine.cxx.

◆ UnpackSpecialCharacters()

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 1592 of file TXMLEngine.cxx.

◆ ValidateDocument()

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

Definition at line 104 of file TXMLEngine.h.

◆ ValidateVersion()

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

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

Definition at line 1414 of file TXMLEngine.cxx.

Member Data Documentation

◆ fSkipComments

Bool_t TXMLEngine::fSkipComments
protected

Definition at line 42 of file TXMLEngine.h.

Libraries for TXMLEngine:
[legend]

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