library: libXMLIO #include "TXMLEngine.h"

# TXMLEngine

class description - source file - inheritance tree (.pdf)

## class TXMLEngine : public TObject

| Inheritance Chart:
`TObject`
| <- | `TXMLEngine` |

        protected:

          xmlAttrPointer AllocateAttr(int namelen, int valuelen, xmlNodePointer xmlnode)
          xmlNodePointer AllocateNode(int namelen, xmlNodePointer parent)
            xmlNsPointer FindNs(xmlNodePointer xmlnode, const char* nsname)
                   char* makenstr(const char* start, int len)
                   char* makestr(const char* str)
                    void OutputValue(Char_t* value, TXMLOutputStream* out)
          xmlNodePointer ReadNode(xmlNodePointer xmlparent, TXMLInputStream* inp, Int_t& resvalue)
                    void SaveNode(xmlNodePointer xmlnode, TXMLOutputStream* out, Int_t layout, Int_t level)
                    void TruncateNsExtension(xmlNodePointer xmlnode)
                    void UnpackSpecialCharacters(char* target, const char* source, int srclen)

        public:

                          TXMLEngine()
                          TXMLEngine(const TXMLEngine&)
                  virtual ~TXMLEngine()
                     void AddChild(xmlNodePointer parent, xmlNodePointer child)
                     void AssignDtd(xmlDocPointer xmldoc, const char* dtdname, const char* rootname)
           static TClass* Class()
                     void CleanNode(xmlNodePointer xmlnode)
           xmlNodePointer DocGetRootElement(xmlDocPointer xmldoc)
                     void DocSetRootElement(xmlDocPointer xmldoc, xmlNodePointer xmlnode)
                     void FreeAttr(xmlNodePointer xmlnode, const char* name)
                     void FreeDoc(xmlDocPointer xmldoc)
                     void FreeNode(xmlNodePointer xmlnode)
              const char* GetAttr(xmlNodePointer xmlnode, const char* name) const
           xmlNodePointer GetChild(xmlNodePointer xmlnode)
                    Int_t GetIntAttr(xmlNodePointer node, const char* name)
           xmlNodePointer GetNext(xmlNodePointer xmlnode)
              const char* GetNodeContent(xmlNodePointer xmlnode) const
              const char* GetNodeName(xmlNodePointer xmlnode) const
           xmlNodePointer GetParent(xmlNodePointer xmlnode)
                   Bool_t HasAttr(xmlNodePointer xmlnode, const char* name)
          virtual TClass* IsA() const
                   Bool_t IsEmptyNode(xmlNodePointer)
           xmlAttrPointer NewAttr(xmlNodePointer xmlnode, xmlNsPointer, const char* name, const char* value)
           xmlNodePointer NewChild(xmlNodePointer parent, xmlNsPointer ns, const char* name, const char* content = "0")
            xmlDocPointer NewDoc(const char* version = "0")
           xmlAttrPointer NewIntAttr(xmlNodePointer xmlnode, const char* name, Int_t value)
             xmlNsPointer NewNS(xmlNodePointer xmlnode, const char* reference, const char* name = "0")
              TXMLEngine& operator=(const TXMLEngine&)
            xmlDocPointer ParseFile(const char* filename)
                     void SaveDoc(xmlDocPointer xmldoc, const char* filename, Int_t layout = 1)
                     void ShiftToNext(xmlNodePointer& xmlnode)
             virtual void ShowMembers(TMemberInspector& insp, char* parent)
                     void SkipEmpty(xmlNodePointer&)
             virtual void Streamer(TBuffer& b)
                     void StreamerNVirtual(TBuffer& b)
                     void UnlinkFreeNode(xmlNodePointer xmlnode)
                     void UnlinkNode(xmlNodePointer node)
                   Bool_t ValidateDocument(xmlDocPointer, Bool_t = kFALSE)

### Data Members

## Class Description

      This class is used to write and read xml files.
      It makes simplified parsing of xml files, but does not required
      any external libraries like libxml2 or other

    ________________________________________________________________________

TXMLEngine()

~TXMLEngine()

Bool_t HasAttr(xmlNodePointer xmlnode, const char* name)

const char* GetAttr(xmlNodePointer xmlnode, const char* name)

Int_t GetIntAttr(xmlNodePointer xmlnode, const char* name)

xmlAttrPointer NewAttr(xmlNodePointer xmlnode, xmlNsPointer, const char* name, const char* value)

xmlAttrPointer NewIntAttr(xmlNodePointer xmlnode, const char* name, Int_t value)

void FreeAttr(xmlNodePointer xmlnode, const char* name)

xmlNodePointer NewChild(xmlNodePointer parent, xmlNsPointer ns, const char* name, const char* content)

xmlNsPointer NewNS(xmlNodePointer xmlnode, const char* reference, const char* name)

void AddChild(xmlNodePointer parent, xmlNodePointer child)

void UnlinkNode(xmlNodePointer xmlnode)

void FreeNode(xmlNodePointer xmlnode)

void UnlinkFreeNode(xmlNodePointer xmlnode)

const char* GetNodeName(xmlNodePointer xmlnode)

const char* GetNodeContent(xmlNodePointer xmlnode)

xmlNodePointer GetChild(xmlNodePointer xmlnode)

xmlNodePointer GetParent(xmlNodePointer xmlnode)

xmlNodePointer GetNext(xmlNodePointer xmlnode)

void ShiftToNext(xmlNodePointer &xmlnode)

void CleanNode(xmlNodePointer xmlnode)

xmlDocPointer NewDoc(const char* version)

void AssignDtd(xmlDocPointer xmldoc, const char* dtdname, const char* rootname)

void FreeDoc(xmlDocPointer xmldoc)

void SaveDoc(xmlDocPointer xmldoc, const char* filename, Int_t layout)

void DocSetRootElement(xmlDocPointer xmldoc, xmlNodePointer xmlnode)

xmlNodePointer DocGetRootElement(xmlDocPointer xmldoc)

xmlDocPointer ParseFile(const char* filename)

char* makestr(const char* str)

char* makenstr(const char* str, int len)

xmlNodePointer AllocateNode(int namelen, xmlNodePointer parent)

    fNumNodes++;

xmlAttrPointer AllocateAttr(int namelen, int valuelen, xmlNodePointer xmlnode)

xmlNsPointer FindNs(xmlNodePointer xmlnode, const char* name)

void TruncateNsExtension(xmlNodePointer xmlnode)

void UnpackSpecialCharacters(char* target, const char* source, int srclen)

void OutputValue(char* value, TXMLOutputStream* out)

void SaveNode(xmlNodePointer xmlnode, TXMLOutputStream* out, Int_t layout, Int_t level)

xmlNodePointer ReadNode(xmlNodePointer xmlparent, TXMLInputStream* inp, Int_t& resvalue)

     resvalue <= 0 if error
     resvalue == 1 if this is endnode of parent
     resvalue == 2 if this is child

### Inline Functions

                 Bool_t IsEmptyNode(xmlNodePointer)
                   void SkipEmpty(xmlNodePointer&)
                 Bool_t ValidateDocument(xmlDocPointer, Bool_t = kFALSE)
                TClass* Class()
                TClass* IsA() const
                   void ShowMembers(TMemberInspector& insp, char* parent)
                   void Streamer(TBuffer& b)
                   void StreamerNVirtual(TBuffer& b)
             TXMLEngine TXMLEngine(const TXMLEngine&)
            TXMLEngine& operator=(const TXMLEngine&)

Author: Sergey Linev 10.05.2004
Last update: root/xml:$Name: $:$Id: TXMLEngine.cxx,v 1.13 2005/06/22 17:05:22 rdm Exp $
Copyright (C) 1995-2004, Rene Brun and Fons Rademakers. *