Added a more convenient XmlElement::findFirstChild and constified first parameter of findNextChild.
git-svn-id: http://yate.null.ro/svn/yate/trunk@5905 acf43c95-373e-0410-b603-e72c3f656dc1
This commit is contained in:
parent
e183bd7020
commit
c256c99a7e
15
yatexml.h
15
yatexml.h
|
@ -1316,6 +1316,19 @@ public:
|
|||
bool noPrefix = true) const
|
||||
{ return XmlFragment::findElement(getChildren().skipNull(),name,ns,noPrefix); }
|
||||
|
||||
/**
|
||||
* Find the first XmlElement child of this XmlElement
|
||||
* @param name Name of the child
|
||||
* @param ns Optional child namespace
|
||||
* @param 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
|
||||
* @return The first child element meeting the requested conditions
|
||||
*/
|
||||
inline XmlElement* findFirstChild(const String& name, const String* ns = 0,
|
||||
bool noPrefix = true) const
|
||||
{ return XmlFragment::findElement(getChildren().skipNull(),&name,ns,noPrefix); }
|
||||
|
||||
/**
|
||||
* Finds next XmlElement child of this XmlElement
|
||||
* @param prev Previous child
|
||||
|
@ -1326,7 +1339,7 @@ public:
|
|||
* This parameter is ignored if name is 0 or ns is not 0
|
||||
* @return The next found child if prev exists else the first
|
||||
*/
|
||||
inline XmlElement* findNextChild(XmlElement* prev = 0, const String* name = 0,
|
||||
inline XmlElement* findNextChild(const XmlElement* prev = 0, const String* name = 0,
|
||||
const String* ns = 0, bool noPrefix = true) const {
|
||||
if (!prev)
|
||||
return findFirstChild(name,ns,noPrefix);
|
||||
|
|
Loading…
Reference in New Issue