class XmlFragment

# class XmlFragment | Xml Fragment. More...
Full name | `TelEngine::XmlFragment`
Definition | `#include <yatexml.h>`
Inherits | TelEngine::XmlParent [public ]
List of all Methods
Annotated List
Files
Globals
Hierarchy
Index

#### Public Methods

- XmlFragment ()
- XmlFragment (const XmlFragment& orig)
- virtual ~XmlFragment ()
- virtual XmlFragment* fragment ()
- virtual const ObjList& getChildren () const
- virtual XmlSaxParser::Error addChild (XmlChild* child)
- virtual void reset ()
- inline XmlChild* pop ()
- XmlElement* popElement ()
- virtual XmlChild* removeChild (XmlChild* child, bool delObj = true)
- virtual void clearChildren ()
- void toString (String& dump, bool escape = true, const String& indent = String::empty(), const String& origIndent = String::empty(), bool completeOnly = true, const String* auth = 0, const XmlElement* parent = 0) const

#### Public Static Methods

- static XmlElement* findElement (ObjList* list, const String* name, const String* ns, bool noPrefix = true)

## Detailed Description

Xml Fragment a fragment from a Xml document

XmlFragment () | ### XmlFragment

Constructor

XmlFragment (const XmlFragment& orig) | ### XmlFragment

Copy constructor

Parameters:

orig | Original XmlFragment

~XmlFragment () | ### ~XmlFragment

[virtual]

Destructor

XmlFragment* fragment () | ### fragment

[virtual]

Get an Xml Fragment

Returns: This

Reimplemented from XmlParent.

const ObjList& getChildren () | ### getChildren

[const virtual]

Get the list of children

Returns: The children list

Reimplemented from XmlParent.

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

[virtual]

Append a new xml child to this fragment

Parameters:

child | the child to append

Returns: An error code if an error was detected

Reimplemented from XmlParent.

void reset () | ### reset

[virtual]

Reset this Xml Fragment

Reimplemented from XmlParent.

inline XmlChild* pop () | ### pop

Remove the first child from list and returns it

Returns: XmlChild pointer or 0

XmlElement* popElement () | ### popElement

Remove the first XmlElement from list and returns it if completed

Returns: XmlElement pointer or 0 if no XmlElement is found or the first one is not completed

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

[virtual]

Remove a child. Reset the parent of not deleted xml element

Parameters:

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

Returns: XmlChild pointer if found and not deleted

Reimplemented from XmlParent.

void clearChildren () | ### clearChildren

[virtual]

Clear the list of children

Reimplemented from XmlParent.

void toString (String& dump, bool escape = true, const String& indent = String::empty(), const String& origIndent = String::empty(), bool completeOnly = true, const String* auth = 0, const XmlElement* parent = 0) | ### toString

[const]

Build a String from this XmlFragment

Parameters:

dump | The string where to append representation
escape | True if the attributes values need to be escaped
indent | Spaces for output
origIndent | Original indent
completeOnly | True to build only if complete
auth | Optional list of tag and attribute names to be replaced with '***'. This parameter can be used when the result will be printed to output to avoid printing authentication data to output. The array must end with an empty string
parent | Optional parent element whose tag will be searched in the auth list

XmlElement* findElement (ObjList* list, const String* name, const String* ns, bool noPrefix = true) | ### findElement

[static]

Find a completed xml element in a list

Parameters:

list | The list to search for the element
name | Optional element tag to match
ns | Optional element namespace to match
noPrefix | True to compare the tag without namespace prefix, false to include namespace prefix when comparing the given tag. This parameter is ignored if name is 0 or ns is not 0

Returns: XmlElement pointer or 0 if not found

Generated by: paulc on bussard on Fri May 8 12:37:22 2015, using kdoc 2.0a54.