Yate
Public Member Functions | Protected Member Functions | Friends
XmlDomParser Class Reference

Document Object Model XML Parser. More...

#include <yatexml.h>

Inheritance diagram for XmlDomParser:
XmlSaxParser DebugEnabler

List of all members.

Public Member Functions

 XmlDomParser (const char *name="XmlDomParser", bool fragment=false)
 XmlDomParser (XmlParent *fragment, bool takeOwnership)
virtual ~XmlDomParser ()
XmlDocumentdocument ()
XmlFragmentfragment ()
virtual void reset ()
bool isCurrent (const XmlElement *el) const

Protected Member Functions

virtual void gotComment (const String &text)
virtual void gotProcessing (const NamedString &instr)
virtual void gotDeclaration (const NamedList &decl)
virtual void gotText (const String &text)
virtual void gotCdata (const String &data)
virtual void gotElement (const NamedList &element, bool empty)
virtual void endElement (const String &name)
virtual void gotDoctype (const String &doc)
virtual bool completed ()

Friends

class XmlChild

Detailed Description

Document Object Model XML Parser.

A Document Object Model (DOM) parser for XML documents and fragments


Constructor & Destructor Documentation

XmlDomParser ( const char *  name = "XmlDomParser",
bool  fragment = false 
)

XmlDomParser constructor

Parameters:
nameDebug name
fragmentTrue if this parser needs to parse a piece of a xml document
XmlDomParser ( XmlParent fragment,
bool  takeOwnership 
)

XmlDomParser constructor

Parameters:
fragmentThe fragment who should keep the parsed data
takeOwnershipTrue to take ownership of the fragment
virtual ~XmlDomParser ( ) [virtual]

Destructor


Member Function Documentation

virtual bool completed ( ) [inline, protected, virtual]

Callback method. Is called to check if we have an incomplete element

Returns:
True if current element is not 0

Reimplemented from XmlSaxParser.

XmlDocument* document ( ) [inline]

Obtain an XmlDocument from the parsed data

Returns:
The XmlDocument or 0

References XmlDocument::document().

virtual void endElement ( const String name) [protected, virtual]

Complete current element

Parameters:
nameThe end tag name

Reimplemented from XmlSaxParser.

XmlFragment* fragment ( ) [inline]

Obtain an XmlFragment from the parsed data

Returns:
The XmlFragment or 0

References XmlParent::fragment().

virtual void gotCdata ( const String data) [protected, virtual]

Append a xml CData in the xml tree

Parameters:
dataThe CData content

Reimplemented from XmlSaxParser.

virtual void gotComment ( const String text) [protected, virtual]

Append a xml comment in the xml tree

Parameters:
textThe comment content

Reimplemented from XmlSaxParser.

virtual void gotDeclaration ( const NamedList decl) [protected, virtual]

Append a xml declaration in the xml tree

Parameters:
declThe declaration content

Reimplemented from XmlSaxParser.

virtual void gotDoctype ( const String doc) [protected, virtual]

Append a xml doctype in the xml tree

Parameters:
docThe doctype content

Reimplemented from XmlSaxParser.

virtual void gotElement ( const NamedList element,
bool  empty 
) [protected, virtual]

Append a xml element in the xml tree

Parameters:
elementThe element content
emptyTrue if the element does not have attributes

Reimplemented from XmlSaxParser.

virtual void gotProcessing ( const NamedString instr) [protected, virtual]

Append a xml instruction in the xml tree

Parameters:
instrThe instruction content

Reimplemented from XmlSaxParser.

virtual void gotText ( const String text) [protected, virtual]

Append a xml text in the xml tree

Parameters:
textThe text content

Reimplemented from XmlSaxParser.

bool isCurrent ( const XmlElement el) const [inline]

Check if the current element is the given one

Parameters:
elThe element to compare with
Returns:
True if they are equal
virtual void reset ( ) [virtual]

Reset parser

Reimplemented from XmlSaxParser.


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