#include <pxml.h>
Public Member Functions | |
PXMLElement (PXMLElement *_parent, const char *name=NULL) | |
PXMLElement (PXMLElement *_parent, const PString &name, const PString &data) | |
BOOL | IsElement () const |
void | PrintOn (ostream &strm) const |
void | Output (ostream &strm, const PXMLBase &xml, int indent) const |
PCaselessString | GetName () const |
void | SetName (const PString &v) |
PINDEX | GetSize () const |
PXMLObject * | AddSubObject (PXMLObject *elem, BOOL dirty=TRUE) |
PXMLElement * | AddChild (PXMLElement *elem, BOOL dirty=TRUE) |
PXMLData * | AddChild (PXMLData *elem, BOOL dirty=TRUE) |
void | SetAttribute (const PCaselessString &key, const PString &value, BOOL setDirty=TRUE) |
PString | GetAttribute (const PCaselessString &key) const |
PString | GetKeyAttribute (PINDEX idx) const |
PString | GetDataAttribute (PINDEX idx) const |
BOOL | HasAttribute (const PCaselessString &key) |
BOOL | HasAttributes () const |
PINDEX | GetNumAttributes () const |
PXMLElement * | GetElement (const PCaselessString &name, PINDEX idx=0) const |
PXMLObject * | GetElement (PINDEX idx=0) const |
BOOL | RemoveElement (PINDEX idx) |
PINDEX | FindObject (PXMLObject *ptr) const |
BOOL | HasSubObjects () const |
PXMLObjectArray | GetSubObjects () const |
PString | GetData () const |
PXMLObject * | Clone (PXMLElement *parent) const |
Protected Attributes | |
PCaselessString | name |
PStringToString | attributes |
PXMLObjectArray | subObjects |
BOOL | dirty |
PXMLElement::PXMLElement | ( | PXMLElement * | _parent, | |
const char * | name = NULL | |||
) |
PXMLElement::PXMLElement | ( | PXMLElement * | _parent, | |
const PString & | name, | |||
const PString & | data | |||
) |
BOOL PXMLElement::IsElement | ( | ) | const [inline, virtual] |
Implements PXMLObject.
void PXMLElement::PrintOn | ( | ostream & | strm | ) | const [virtual] |
Output the contents of the object to the stream. The exact output is dependent on the exact semantics of the descendent class. This is primarily used by the standard operator<<# function.
The default behaviour is to print the class name.
Reimplemented from PObject.
void PXMLElement::Output | ( | ostream & | strm, | |
const PXMLBase & | xml, | |||
int | indent | |||
) | const [virtual] |
Implements PXMLObject.
PCaselessString PXMLElement::GetName | ( | ) | const [inline] |
void PXMLElement::SetName | ( | const PString & | v | ) | [inline] |
PINDEX PXMLElement::GetSize | ( | ) | const [inline] |
PXMLObject* PXMLElement::AddSubObject | ( | PXMLObject * | elem, | |
BOOL | dirty = TRUE | |||
) |
PXMLElement* PXMLElement::AddChild | ( | PXMLElement * | elem, | |
BOOL | dirty = TRUE | |||
) |
void PXMLElement::SetAttribute | ( | const PCaselessString & | key, | |
const PString & | value, | |||
BOOL | setDirty = TRUE | |||
) |
PString PXMLElement::GetAttribute | ( | const PCaselessString & | key | ) | const |
PString PXMLElement::GetKeyAttribute | ( | PINDEX | idx | ) | const |
PString PXMLElement::GetDataAttribute | ( | PINDEX | idx | ) | const |
BOOL PXMLElement::HasAttribute | ( | const PCaselessString & | key | ) |
BOOL PXMLElement::HasAttributes | ( | ) | const [inline] |
PINDEX PXMLElement::GetNumAttributes | ( | ) | const [inline] |
PXMLElement* PXMLElement::GetElement | ( | const PCaselessString & | name, | |
PINDEX | idx = 0 | |||
) | const |
PXMLObject* PXMLElement::GetElement | ( | PINDEX | idx = 0 |
) | const |
BOOL PXMLElement::RemoveElement | ( | PINDEX | idx | ) |
PINDEX PXMLElement::FindObject | ( | PXMLObject * | ptr | ) | const |
BOOL PXMLElement::HasSubObjects | ( | ) | const [inline] |
PXMLObjectArray PXMLElement::GetSubObjects | ( | ) | const [inline] |
PString PXMLElement::GetData | ( | ) | const |
PXMLObject* PXMLElement::Clone | ( | PXMLElement * | parent | ) | const [virtual] |
Implements PXMLObject.
PCaselessString PXMLElement::name [protected] |
PStringToString PXMLElement::attributes [protected] |
PXMLObjectArray PXMLElement::subObjects [protected] |
BOOL PXMLElement::dirty [protected] |
Reimplemented from PXMLObject.