SYNOPSISxmlNode[] xmlTreeGetChildren(xmlNode parent [, string name
[, string ns_URI]])
Parameters:
element
- the element to get the children fromname
(optional) - only get children with the
specified local name. If not specified, all children are returned.ns_URI
(optional) - limit result to the children in
the namespace ns_URI
. If not specified, namespace is ignored.
Returns:
xmlNode
children of the element parent
DESCRIPTIONxmlTreeGetChildren()
returns the children of the element
parent
, which includes elements, comments, CDATA, etc.
If you only want certain elements, you can specify a name
parameter to only get elements named name
.
Additionally, if no ns_URI
is specified, then the namespace
prefix/URIs are disregarded and only local names are compared. If a
ns_URI
is provided, only an attribute that matches a name and
the namespace URI will be returned. This includes the empty
namespace; if you pass in a ns_URI
as ''
, then only the
attribute matching that name and without a namespace will be
returned.
EXAMPLE<$children = (xmlTreeGetChildren($parent, 'item'))>
SEE ALSOxmlTreeGetFirstChild
,
xmlTreeGetNext
,
xmlTreeGetPrevious
,
xmlTreeGetParent
,
xmlTreeGetChildrenContent