PHP children() Function
PHP SimpleXML Reference Manual
Example
Find the child nodes of the note node:
"; } ?>
Run Example »
Definition and Usage
The children() function finds the child nodes of a specified node.
Syntax
children(
ns,is_prefix
);
| Parameters | Description |
|---|---|
| ns | Optional. Specifies an XML namespace. |
| is_prefix | Optional. Specifies a boolean. If the value is TRUE, then ns is a prefix. If the value is FALSE, then ns is the namespace URL. |
Technical Details
| Return Value: | Returns a SimpleXMLElement object. |
|---|---|
| PHP Version: | 5.0.1+ |
| PHP Changelog: | Added is_prefix parameter was added. |
More examples
Example 1
Find the child nodes of the body node:
"; } ?>
Run Example »
PHP SimpleXML Reference Manual