Logo ROOT  
Reference Guide
 
Loading...
Searching...
No Matches
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
 
virtual ~TXMLEngine ()
 destructor for TXMLEngine object
 
void AddChild (XMLNodePointer_t parent, XMLNodePointer_t child)
 add child element to xmlnode
 
void AddChildAfter (XMLNodePointer_t parent, XMLNodePointer_t child, XMLNodePointer_t afternode)
 Insert new child node after already existing node.
 
void AddChildFirst (XMLNodePointer_t parent, XMLNodePointer_t child)
 add node as first child
 
Bool_t AddComment (XMLNodePointer_t parent, const char *comment)
 Adds comment line to the node.
 
Bool_t AddDocComment (XMLDocPointer_t xmldoc, const char *comment)
 add comment line to the top of the document
 
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.
 
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.
 
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
 
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.
 
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.
 
void AssignDtd (XMLDocPointer_t xmldoc, const char *dtdname, const char *rootname)
 assigns dtd filename to document
 
void CleanNode (XMLNodePointer_t xmlnode)
 remove all children node from xmlnode
 
XMLNodePointer_t DocGetRootElement (XMLDocPointer_t xmldoc)
 returns root node of document
 
void DocSetRootElement (XMLDocPointer_t xmldoc, XMLNodePointer_t xmlnode)
 set main (root) node for document
 
void FreeAllAttr (XMLNodePointer_t xmlnode)
 Free all attributes of the node.
 
void FreeAttr (XMLNodePointer_t xmlnode, const char *name)
 remove attribute from xmlnode
 
void FreeDoc (XMLDocPointer_t xmldoc)
 frees allocated document data and deletes document itself
 
void FreeNode (XMLNodePointer_t xmlnode)
 release all memory, allocated from this node and destroys node itself
 
const char * GetAttr (XMLNodePointer_t xmlnode, const char *name)
 returns value of attribute for xmlnode
 
const char * GetAttrName (XMLAttrPointer_t xmlattr)
 return name of the attribute
 
const char * GetAttrValue (XMLAttrPointer_t xmlattr)
 return value of attribute
 
XMLNodePointer_t GetChild (XMLNodePointer_t xmlnode, Bool_t realnode=kTRUE)
 returns first child of xmlnode
 
XMLAttrPointer_t GetFirstAttr (XMLNodePointer_t xmlnode)
 return first attribute in the list, namespace (if exists) will be skipped
 
Int_t GetIntAttr (XMLNodePointer_t node, const char *name)
 returns value of attribute as integer
 
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
 
XMLAttrPointer_t GetNextAttr (XMLAttrPointer_t xmlattr)
 return next attribute in the list
 
const char * GetNodeContent (XMLNodePointer_t xmlnode)
 get contents (if any) of xmlnode
 
const char * GetNodeName (XMLNodePointer_t xmlnode)
 returns name of xmlnode
 
XMLNsPointer_t GetNS (XMLNodePointer_t xmlnode)
 return namespace attribute (if exists)
 
const char * GetNSName (XMLNsPointer_t ns)
 return name id of namespace
 
const char * GetNSReference (XMLNsPointer_t ns)
 return reference id of namespace
 
XMLNodePointer_t GetParent (XMLNodePointer_t xmlnode)
 returns parent of xmlnode
 
Bool_t GetSkipComments () const
 
Bool_t HasAttr (XMLNodePointer_t xmlnode, const char *name)
 checks if node has attribute of specified name
 
Bool_t IsCommentNode (XMLNodePointer_t xmlnode)
 return kTRUE is this is special node with content
 
Bool_t IsContentNode (XMLNodePointer_t xmlnode)
 return kTRUE is this is special node with content
 
Bool_t IsEmptyNode (XMLNodePointer_t xmlnode)
 return kTRUE is this is node with special data like comments to data processing instructions
 
Bool_t IsXmlNode (XMLNodePointer_t xmlnode)
 return kTRUE is this is normal xmlnode
 
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
 
XMLNodePointer_t NewChild (XMLNodePointer_t parent, XMLNsPointer_t ns, const char *name, const char *content=nullptr)
 create new child element for parent node
 
XMLDocPointer_t NewDoc (const char *version="1.0")
 creates new xml document with provided version
 
XMLAttrPointer_t NewIntAttr (XMLNodePointer_t xmlnode, const char *name, Int_t value)
 create node attribute with integer value
 
XMLNsPointer_t NewNS (XMLNodePointer_t xmlnode, const char *reference, const char *name=nullptr)
 create namespace attribute for xmlnode.
 
XMLDocPointer_t ParseFile (const char *filename, Int_t maxbuf=100000)
 Parses content of file and tries to produce xml structures.
 
XMLDocPointer_t ParseString (const char *xmlstring)
 parses content of string and tries to produce xml structures
 
XMLNodePointer_t ReadSingleNode (const char *src)
 read single xmlnode from provided string
 
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.
 
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.
 
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
 
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
 
void SkipEmpty (XMLNodePointer_t &xmlnode)
 Skip all current empty nodes and locate on first "true" node.
 
void UnlinkFreeNode (XMLNodePointer_t xmlnode)
 combined operation. Unlink node and free used memory
 
void UnlinkNode (XMLNodePointer_t node)
 unlink (detach) xmlnode from parent
 
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
 
- Public Member Functions inherited from TObject
 TObject ()
 TObject constructor.
 
 TObject (const TObject &object)
 TObject copy ctor.
 
virtual ~TObject ()
 TObject destructor.
 
void AbstractMethod (const char *method) const
 Use this method to implement an "abstract" method that you don't want to leave purely abstract.
 
virtual void AppendPad (Option_t *option="")
 Append graphics object to current pad.
 
virtual void Browse (TBrowser *b)
 Browse object. May be overridden for another default action.
 
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.
 
virtual const char * ClassName () const
 Returns name of class to which the object belongs.
 
virtual void Clear (Option_t *="")
 
virtual TObjectClone (const char *newname="") const
 Make a clone of an object using the Streamer facility.
 
virtual Int_t Compare (const TObject *obj) const
 Compare abstract method.
 
virtual void Copy (TObject &object) const
 Copy this to obj.
 
virtual void Delete (Option_t *option="")
 Delete this object.
 
virtual Int_t DistancetoPrimitive (Int_t px, Int_t py)
 Computes distance from point (px,py) to the object.
 
virtual void Draw (Option_t *option="")
 Default Draw method for all objects.
 
virtual void DrawClass () const
 Draw class inheritance tree of the class to which this object belongs.
 
virtual TObjectDrawClone (Option_t *option="") const
 Draw a clone of this object in the current selected pad for instance with: gROOT->SetSelectedPad(gPad).
 
virtual void Dump () const
 Dump contents of object on stdout.
 
virtual void Error (const char *method, const char *msgfmt,...) const
 Issue error message.
 
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.
 
virtual void Execute (TMethod *method, TObjArray *params, Int_t *error=0)
 Execute method on this object with parameters stored in the TObjArray.
 
virtual void ExecuteEvent (Int_t event, Int_t px, Int_t py)
 Execute action corresponding to an event at (px,py).
 
virtual void Fatal (const char *method, const char *msgfmt,...) const
 Issue fatal error message.
 
virtual TObjectFindObject (const char *name) const
 Must be redefined in derived classes.
 
virtual TObjectFindObject (const TObject *obj) const
 Must be redefined in derived classes.
 
virtual Option_tGetDrawOption () const
 Get option used by the graphics system to draw this object.
 
virtual const char * GetIconName () const
 Returns mime type name of object.
 
virtual const char * GetName () const
 Returns name of object.
 
virtual char * GetObjectInfo (Int_t px, Int_t py) const
 Returns string containing info about the object at position (px,py).
 
virtual Option_tGetOption () const
 
virtual const char * GetTitle () const
 Returns title of object.
 
virtual UInt_t GetUniqueID () const
 Return the unique object id.
 
virtual Bool_t HandleTimer (TTimer *timer)
 Execute action in response of a timer timing out.
 
virtual ULong_t Hash () const
 Return hash value for this object.
 
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.
 
virtual void Info (const char *method, const char *msgfmt,...) const
 Issue info message.
 
virtual Bool_t InheritsFrom (const char *classname) const
 Returns kTRUE if object inherits from class "classname".
 
virtual Bool_t InheritsFrom (const TClass *cl) const
 Returns kTRUE if object inherits from TClass cl.
 
virtual void Inspect () const
 Dump contents of this object in a graphics canvas.
 
void InvertBit (UInt_t f)
 
Bool_t IsDestructed () const
 IsDestructed.
 
virtual Bool_t IsEqual (const TObject *obj) const
 Default equal comparison (objects are equal if they have the same address in memory).
 
virtual Bool_t IsFolder () const
 Returns kTRUE in case object contains browsable objects (like containers or lists of other objects).
 
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.
 
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).
 
virtual Bool_t Notify ()
 This method must be overridden to handle object notification.
 
void Obsolete (const char *method, const char *asOfVers, const char *removedFromVers) const
 Use this method to declare a method obsolete.
 
void operator delete (void *ptr)
 Operator delete.
 
void operator delete[] (void *ptr)
 Operator delete [].
 
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.
 
virtual void Paint (Option_t *option="")
 This method must be overridden if a class wants to paint itself.
 
virtual void Pop ()
 Pop on object drawn in a pad to the top of the display list.
 
virtual void Print (Option_t *option="") const
 This method must be overridden when a class wants to print itself.
 
virtual Int_t Read (const char *name)
 Read contents of object with specified name from the current directory.
 
virtual void RecursiveRemove (TObject *obj)
 Recursively remove this object from a list.
 
void ResetBit (UInt_t f)
 
virtual void SaveAs (const char *filename="", Option_t *option="") const
 Save this object in the file specified by filename.
 
virtual void SavePrimitive (std::ostream &out, Option_t *option="")
 Save a primitive as a C++ statement(s) on output stream "out".
 
void SetBit (UInt_t f)
 
void SetBit (UInt_t f, Bool_t set)
 Set or unset the user status bits as specified in f.
 
virtual void SetDrawOption (Option_t *option="")
 Set drawing option for object.
 
virtual void SetUniqueID (UInt_t uid)
 Set the unique object id.
 
virtual void SysError (const char *method, const char *msgfmt,...) const
 Issue system error message.
 
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.
 
virtual void Warning (const char *method, const char *msgfmt,...) const
 Issue warning message.
 
virtual Int_t Write (const char *name=0, Int_t option=0, Int_t bufsize=0)
 Write this object to the current directory.
 
virtual Int_t Write (const char *name=0, Int_t option=0, Int_t bufsize=0) const
 Write this object to the current directory.
 

Protected Member Functions

XMLAttrPointer_t AllocateAttr (int namelen, int valuelen, XMLNodePointer_t xmlnode)
 Allocate new attribute with specified name length and value length.
 
XMLNodePointer_t AllocateNode (int namelen, XMLNodePointer_t parent)
 Allocates new xml node with specified name length.
 
void DisplayError (Int_t error, Int_t linenumber)
 Displays xml parsing error.
 
XMLNsPointer_t FindNs (XMLNodePointer_t xmlnode, const char *nsname)
 define if namespace of that name exists for xmlnode
 
char * Makenstr (const char *start, int len)
 creates char* variable with copy of len symbols from provided string
 
char * Makestr (const char *str)
 creates char* variable with copy of provided string
 
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
 
XMLDocPointer_t ParseStream (TXMLInputStream *input)
 parses content of the stream and tries to produce xml structures
 
XMLNodePointer_t ReadNode (XMLNodePointer_t xmlparent, TXMLInputStream *inp, Int_t &resvalue)
 Tries to construct xml node from input stream.
 
void SaveNode (XMLNodePointer_t xmlnode, TXMLOutputStream *out, Int_t layout, Int_t level)
 stream data of xmlnode to output
 
void TruncateNsExtension (XMLNodePointer_t xmlnode)
 removes namespace extension of nodename
 
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
 
- 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).
 
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 Longptr_t GetDtorOnly ()
 Return destructor only flag.
 
static Bool_t GetObjectStat ()
 Get status of object stat flag.
 
static void SetDtorOnly (void *obj)
 Set destructor only flag.
 
static void SetObjectStat (Bool_t stat)
 Turn on/off tracking of objects in the TObjectTable.
 
- 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 524 of file TXMLEngine.cxx.

◆ ~TXMLEngine()

TXMLEngine::~TXMLEngine ( )
virtual

destructor for TXMLEngine object

Definition at line 532 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 799 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 846 of file TXMLEngine.cxx.

◆ AddChildFirst()

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

add node as first child

Definition at line 824 of file TXMLEngine.cxx.

◆ AddComment()

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

Adds comment line to the node.

Definition at line 878 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 895 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 932 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 986 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 1128 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 915 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 953 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 1537 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 1514 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 1274 of file TXMLEngine.cxx.

◆ CleanNode()

void TXMLEngine::CleanNode ( XMLNodePointer_t  xmlnode)

remove all children node from xmlnode

Definition at line 1235 of file TXMLEngine.cxx.

◆ DisplayError()

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

Displays xml parsing error.

Definition at line 2222 of file TXMLEngine.cxx.

◆ DocGetRootElement()

XMLNodePointer_t TXMLEngine::DocGetRootElement ( XMLDocPointer_t  xmldoc)

returns root node of document

Definition at line 1339 of file TXMLEngine.cxx.

◆ DocSetRootElement()

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

set main (root) node for document

Definition at line 1326 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 1562 of file TXMLEngine.cxx.

◆ FreeAllAttr()

void TXMLEngine::FreeAllAttr ( XMLNodePointer_t  xmlnode)

Free all attributes of the node.

Definition at line 647 of file TXMLEngine.cxx.

◆ FreeAttr()

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

remove attribute from xmlnode

Definition at line 622 of file TXMLEngine.cxx.

◆ FreeDoc()

void TXMLEngine::FreeDoc ( XMLDocPointer_t  xmldoc)

frees allocated document data and deletes document itself

Definition at line 1288 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 1037 of file TXMLEngine.cxx.

◆ GetAttr()

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

returns value of attribute for xmlnode

Definition at line 555 of file TXMLEngine.cxx.

◆ GetAttrName()

const char * TXMLEngine::GetAttrName ( XMLAttrPointer_t  xmlattr)

return name of the attribute

Definition at line 692 of file TXMLEngine.cxx.

◆ GetAttrValue()

const char * TXMLEngine::GetAttrValue ( XMLAttrPointer_t  xmlattr)

return value of attribute

Definition at line 703 of file TXMLEngine.cxx.

◆ GetChild()

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

returns first child of xmlnode

Definition at line 1146 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 665 of file TXMLEngine.cxx.

◆ GetIntAttr()

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

returns value of attribute as integer

Definition at line 571 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 1167 of file TXMLEngine.cxx.

◆ GetNextAttr()

XMLAttrPointer_t TXMLEngine::GetNextAttr ( XMLAttrPointer_t  xmlattr)

return next attribute in the list

Definition at line 681 of file TXMLEngine.cxx.

◆ GetNodeContent()

const char * TXMLEngine::GetNodeContent ( XMLNodePointer_t  xmlnode)

get contents (if any) of xmlnode

Definition at line 1083 of file TXMLEngine.cxx.

◆ GetNodeName()

const char * TXMLEngine::GetNodeName ( XMLNodePointer_t  xmlnode)

returns name of xmlnode

Definition at line 1075 of file TXMLEngine.cxx.

◆ GetNS()

XMLNsPointer_t TXMLEngine::GetNS ( XMLNodePointer_t  xmlnode)

return namespace attribute (if exists)

Definition at line 766 of file TXMLEngine.cxx.

◆ GetNSName()

const char * TXMLEngine::GetNSName ( XMLNsPointer_t  ns)

return name id of namespace

Definition at line 778 of file TXMLEngine.cxx.

◆ GetNSReference()

const char * TXMLEngine::GetNSReference ( XMLNsPointer_t  ns)

return reference id of namespace

Definition at line 791 of file TXMLEngine.cxx.

◆ GetParent()

XMLNodePointer_t TXMLEngine::GetParent ( XMLNodePointer_t  xmlnode)

returns parent of xmlnode

Definition at line 1158 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 539 of file TXMLEngine.cxx.

◆ IsCommentNode()

Bool_t TXMLEngine::IsCommentNode ( XMLNodePointer_t  xmlnode)

return kTRUE is this is special node with content

Definition at line 1218 of file TXMLEngine.cxx.

◆ IsContentNode()

Bool_t TXMLEngine::IsContentNode ( XMLNodePointer_t  xmlnode)

return kTRUE is this is special node with content

Definition at line 1210 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 1202 of file TXMLEngine.cxx.

◆ IsXmlNode()

Bool_t TXMLEngine::IsXmlNode ( XMLNodePointer_t  xmlnode)

return kTRUE is this is normal xmlnode

Definition at line 1194 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 1501 of file TXMLEngine.cxx.

◆ Makestr()

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

creates char* variable with copy of provided string

Definition at line 1486 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 586 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 715 of file TXMLEngine.cxx.

◆ NewDoc()

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

creates new xml document with provided version

Definition at line 1255 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 612 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 741 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 1642 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 1356 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 1380 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 1369 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 1775 of file TXMLEngine.cxx.

◆ ReadSingleNode()

XMLNodePointer_t TXMLEngine::ReadSingleNode ( const char *  src)

read single xmlnode from provided string

Definition at line 1463 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 1306 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 1673 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 1450 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 1101 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 1182 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 1226 of file TXMLEngine.cxx.

◆ TruncateNsExtension()

void TXMLEngine::TruncateNsExtension ( XMLNodePointer_t  xmlnode)
protected

removes namespace extension of nodename

Definition at line 1579 of file TXMLEngine.cxx.

◆ UnlinkFreeNode()

void TXMLEngine::UnlinkFreeNode ( XMLNodePointer_t  xmlnode)

combined operation. Unlink node and free used memory

Definition at line 1066 of file TXMLEngine.cxx.

◆ UnlinkNode()

void TXMLEngine::UnlinkNode ( XMLNodePointer_t  node)

unlink (detach) xmlnode from parent

Definition at line 1005 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 1598 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 1420 of file TXMLEngine.cxx.

Member Data Documentation

◆ fSkipComments

Bool_t TXMLEngine::fSkipComments
protected

Definition at line 42 of file TXMLEngine.h.

Libraries for TXMLEngine:

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