embite::Element Class Reference

Represents an XML element. More...

#include <Element.h>

Inheritance diagram for embite::Element:

embite::ElementOwner

List of all members.

Public Member Functions

 Element (ElementOwner *owner, const Glib::ustring &name, const Glib::ustring &prefix=Glib::ustring(), const Glib::ustring &nsUri=Glib::ustring())
 Element (xmlpp::Element *xElem, ElementOwner *owner=NULL)
ElementgetSibling (const Glib::ustring &name, const Glib::ustring &nsUri=Glib::ustring(), Element *excludeList=NULL, ElementOwner *owner=NULL) const
ElementgetElement (const Glib::ustring &name, const Glib::ustring &nsUri=Glib::ustring(), Element *excludeList=NULL, ElementOwner *owner=NULL) const
bool checkAttribute (const VariantValueIn &val, const Glib::ustring &name, const Glib::ustring &nsUri=Glib::ustring()) const
 Checks if the attribute exists and if matches the given value.
bool getAttributeValue (VariantValueOut val, const Glib::ustring &name, const Glib::ustring &nsUri=Glib::ustring()) const
 Gets the attribute value if the attribute exists.
bool checkValue (const VariantValueIn &val) const
 Checks if the text of that element matches the given value.
bool getValue (VariantValueOut val, Element *excludeList=NULL, ElementOwner *owner=NULL) const
bool getValue (Element *&children, Element *excludeList=NULL, ElementOwner *owner=NULL) const
 Gets list of all child elements.
ElementcreateElement (const Glib::ustring &name, const Glib::ustring &prefix=Glib::ustring(), const Glib::ustring &nsUri=Glib::ustring())
 Creates a child element.
void createAttribute (const Glib::ustring &name, const VariantValueIn &val, const Glib::ustring &prefix=Glib::ustring(), const Glib::ustring &nsUri=Glib::ustring())
 Creates an attribute.
void setValue (VariantValueIn val)
 Sets the element text value.
void setValue (Element *children)
 Recurses over children, inserting them in the current element.
xmlpp::Document * getDocument ()
 Returns the document object if this is the root node.

Static Public Member Functions

static ElementcreateSibling (ElementOwner *owner, Element *&base, const Glib::ustring &name, const Glib::ustring &prefix=Glib::ustring(), const Glib::ustring &nsUri=Glib::ustring())

Public Attributes

ElementpNext
 Next element from a linked list. Allows easy list creation and iteration.

Classes

class  Impl


Detailed Description

Represents an XML element.

Member Function Documentation

Element * embite::Element::getSibling ( const Glib::ustring &  name,
const Glib::ustring &  nsUri = Glib::ustring(),
Element excludeList = NULL,
ElementOwner owner = NULL 
) const

Obtains a list of all sibling elements which have certain name. The returned list may also include this element! If no element with the given name is found, empty list is returned

Element * embite::Element::getElement ( const Glib::ustring &  name,
const Glib::ustring &  nsUri = Glib::ustring(),
Element excludeList = NULL,
ElementOwner owner = NULL 
) const

Obtains a list of all child elements which have certain name If no element with the given name is found, empty list is returned

bool embite::Element::getValue ( VariantValueOut  val,
Element excludeList = NULL,
ElementOwner owner = NULL 
) const

Gets the text value of the element. The second and third argument are just for compatibility

Element * embite::Element::createSibling ( ElementOwner owner,
Element *&  base,
const Glib::ustring &  name,
const Glib::ustring &  prefix = Glib::ustring(),
const Glib::ustring &  nsUri = Glib::ustring() 
) [static]

Creates a sibling element to the given one


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

Generated on Thu Mar 12 19:13:00 2009 for embite by  doxygen 1.5.6