# class XmlParent | Xml Parent. More...
Contains pure virtuals
Full name | `TelEngine::XmlParent`
Definition | `#include <libs/yxml/yatexml.h>`
Inherited by | XmlDocument, XmlElement, XmlFragment
List of all Methods
Annotated List
Files
Globals
Hierarchy
Index

#### Public Methods

- XmlParent ()
- virtual ~XmlParent ()
- virtual XmlDocument* document ()
- virtual XmlFragment* fragment ()
- virtual XmlElement* element ()
- virtual XmlSaxParser::Error addChild (XmlChild* child)
- inline XmlChild* addChildSafe (XmlChild* child)
- virtual XmlChild* removeChild (XmlChild* child, bool delObj = true)
- virtual void reset ()
- virtual const ObjList& getChildren () const
- virtual void clearChildren ()
- inline bool hasChildren () const

## Detailed Description

Xml Parent for a Xml child

XmlParent () | ### XmlParent

Constructor

~XmlParent () | ### ~XmlParent

[virtual]

Destructor

XmlDocument* document () | ### document

[virtual]

Get an XmlDocument object from this XmlParent. Default implementation return 0

Returns: 0

XmlFragment* fragment () | ### fragment

[virtual]

Get an XmlFragment object from this XmlParent. Default implementation return 0

Returns: 0

XmlElement* element () | ### element

[virtual]

Get an XmlElement object from this XmlParent. Default implementation return 0

Returns: 0

XmlSaxParser::Error addChild (XmlChild* child) | ### addChild

[pure virtual]

Append a new child to this XmlParent

Parameters:

child | The child to append

Returns: NoError if the child was successfully added

inline XmlChild* addChildSafe (XmlChild* child) | ### addChildSafe

Append a new child of this XmlParent, release the object on failure

Parameters:

child | The child to append

Returns: The child on success, 0 on failure

XmlChild* removeChild (XmlChild* child, bool delObj = true) | ### removeChild

[pure virtual]

Remove a child

Parameters:

child | The child to remove
delObj | True to delete the object

Returns: XmlChild pointer if found and not deleted

void reset () | ### reset

[virtual]

Reset this xml parent. Default implementation does nothing

const ObjList& getChildren () | ### getChildren

[const virtual]

Obtain this xml parent children. Default implementation returns an empty list

Returns: The list of children

void clearChildren () | ### clearChildren

[virtual]

Clear this xml parent children. Default implementation does nothing

inline bool hasChildren () | ### hasChildren

[const]

Check if at least one child element exists

Returns: True if this parent has at least one child

Generated by: paulc on bussard on Mon Feb 10 13:15:47 2014, using kdoc 2.0a54.