The SimpleXMLIterator class
(PHP 5 >= 5.1.3, PHP 7, PHP 8)
簡介
The SimpleXMLIterator provides recursive iteration over all nodes of a SimpleXMLElement object.
類摘要
class SimpleXMLIterator
extends
SimpleXMLElement
{
/* 方法 */
/* 繼承的方法 */
public SimpleXMLElement::addAttribute(string
$qualifiedName, string $value, ?string $namespace = null): voidpublic SimpleXMLElement::addChild(string
$qualifiedName, ?string $value = null, ?string $namespace = null): ?SimpleXMLElementpublic SimpleXMLElement::attributes(?string
$namespaceOrPrefix = null, bool $isPrefix = false): ?SimpleXMLElementpublic SimpleXMLElement::children(?string
$namespaceOrPrefix = null, bool $isPrefix = false): ?SimpleXMLElementpublic SimpleXMLElement::getDocNamespaces(bool
}$recursive = false, bool $fromRoot = true): array|false更新日誌
| 版本 | 說明 |
|---|---|
| 8.0.0 | SimpleXMLIterator implements Stringable now. |
目錄
- SimpleXMLIterator::current — Returns the current element
- SimpleXMLIterator::getChildren — Returns the sub-elements of the current element
- SimpleXMLIterator::hasChildren — Checks whether the current element has sub elements
- SimpleXMLIterator::key — Return current key
- SimpleXMLIterator::next — Move to next element
- SimpleXMLIterator::rewind — Rewind to the first element
- SimpleXMLIterator::valid — Check whether the current element is valid