xmlTreeGetChildren

 

SYNOPSIS

xmlNode[] xmlTreeGetChildren(xmlNode parent [, string name
                               [, string ns_URI]])

Parameters:

  • element - the element to get the children from

  • name (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:

  • the xmlNode children of the element parent


DESCRIPTION
xmlTreeGetChildren() 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 ALSO
xmlTreeGetFirstChild, xmlTreeGetNext, xmlTreeGetPrevious, xmlTreeGetParent, xmlTreeGetChildrenContent


Copyright © Thunderstone Software     Last updated: Sep 25 2019
Copyright © 2019 Thunderstone Software LLC. All rights reserved.