PHP » GoLang |
login |
register |
about
|
GoLang SimpleXMLElement::children
request it (335)
GoLang replacement for PHP's SimpleXMLElement::children
[edit | history]
PHP SimpleXMLElement::childrenPHP original manual for SimpleXMLElement::children [ show | php.net ]SimpleXMLElement::children(PHP 5, PHP 7) SimpleXMLElement::children — Finds children of given node DescriptionThis method finds the children of an element. The result follows normal iteration rules.
Parameters
Return ValuesReturns a SimpleXMLElement element, whether the node has children or not. Changelog
Examples
Example #1 Traversing a children() pseudo-array
<?php The above example will output: The person begot a son who begot a daughter; The person begot a daughter who begot a son; and that son begot a son Example #2 Using namespaces
<?php int(0) int(2) int(2) int(0) int(1) NotesSimpleXMLElement::children() returns a node object no matter if the current node has children or not. Use count() on the return value to see if there are any children. As of PHP 5.3.0, SimpleXMLElement::count() may be used instead. See Also
|
more
Recently updated
more
Most requested
more
Last requests
|