| Yate
    | 
Xml Fragment. More...
#include <yatexml.h>
 
  
| Public Member Functions | |
| XmlFragment () | |
| XmlFragment (const XmlFragment &orig) | |
| virtual | ~XmlFragment () | 
| virtual XmlFragment * | fragment () | 
| virtual const ObjList & | getChildren () const | 
| virtual XmlSaxParser::Error | addChild (XmlChild *child) | 
| virtual void | reset () | 
| XmlChild * | pop () | 
| XmlElement * | popElement () | 
| virtual XmlChild * | removeChild (XmlChild *child, bool delObj=true) | 
| virtual void | clearChildren () | 
| void | copy (const XmlFragment &other, XmlParent *parent=0) | 
| 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 | 
| void | replaceParams (const NamedList ¶ms) | 
|  Public Member Functions inherited from XmlParent | |
| XmlParent () | |
| virtual | ~XmlParent () | 
| virtual XmlDocument * | document () | 
| virtual XmlElement * | element () | 
| XmlChild * | addChildSafe (XmlChild *child, XmlSaxParser::Error *code=0) | 
| bool | hasChildren () const | 
| Static Public Member Functions | |
| static XmlElement * | findElement (ObjList *list, const String *name, const String *ns, bool noPrefix=true) | 
| static XmlElement * | getElement (ObjList *&lst, const String *name=0, const String *ns=0, bool noPrefix=true) | 
| static XmlText * | findText (ObjList *lst) | 
| static XmlText * | getText (ObjList *&lst) | 
Xml Fragment.
Xml Fragment a fragment from a Xml document
| XmlFragment | ( | ) | 
Constructor
| XmlFragment | ( | const XmlFragment & | orig | ) | 
Copy constructor
| orig | Original XmlFragment | 
| 
 | virtual | 
Destructor
| 
 | virtual | 
Append a new xml child to this fragment
| child | the child to append | 
Implements XmlParent.
| 
 | inlinevirtual | 
Clear the list of children
Reimplemented from XmlParent.
References ObjList::clear().
Referenced by XmlElement::clearChildren().
| void copy | ( | const XmlFragment & | other, | 
| XmlParent * | parent = 0 ) | 
Copy other fragment into this one
| other | Fragment to copy | 
| parent | Optional parent to set in copied children | 
| 
 | inlinestatic | 
Find a completed xml element in a list
| 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 | 
References XmlFragment::getElement().
Referenced by XmlElement::findFirstChild(), XmlElement::findFirstChild(), and XmlElement::findNextChild().
Retrieve first XML text from given list
| lst | List of XmlChild | 
References XmlFragment::getText().
| 
 | inlinevirtual | 
| 
 | inlinevirtual | 
Get the list of children
Reimplemented from XmlParent.
Referenced by XmlElement::getChildren().
| 
 | static | 
Retrieve first XML element from given list. Advance the list when found
| lst | List of XmlChild | 
| 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 | 
Referenced by XmlFragment::findElement().
Retrieve first XML text from given list. Advance the list when found
| lst | List of XmlChild | 
References ObjList::get(), ObjList::skipNext(), and XmlText::xmlText().
Referenced by XmlFragment::findText().
| 
 | inline | 
Remove the first child from list and returns it
References ObjList::remove().
| XmlElement * popElement | ( | ) | 
Remove the first XmlElement from list and returns it if completed
Remove a child. Reset the parent of not deleted xml element
| child | The child to remove | 
| delObj | True to delete the object | 
Implements XmlParent.
Referenced by XmlElement::pop(), and XmlDocument::removeChild().
| void replaceParams | ( | const NamedList & | params | ) | 
Replaces all ${paramname} in fragment's children with the corresponding parameters
| params | List of parameters | 
| 
 | virtual | 
Reset this Xml Fragment
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 ) const | 
Build a String from this XmlFragment
| 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 |