La classe SimpleXMLIterator

(No version information available, might only be in Git)

Introduction

La classe SimpleXMLIterator fournit des itérations récursives sur tous les éléments d'un objet SimpleXMLElement.

Synopsis de la classe

class SimpleXMLIterator extends SimpleXMLElement {
/* Méthodes héritées */
public SimpleXMLElement::__construct(
    string $data,
    int $options = 0,
    bool $dataIsURL = false,
    string $namespaceOrPrefix = "",
    bool $isPrefix = false
)
public SimpleXMLElement::addAttribute(string $qualifiedName, string $value, ?string $namespace = null): void
public SimpleXMLElement::addChild(string $qualifiedName, ?string $value = null, ?string $namespace = null): ?SimpleXMLElement
public SimpleXMLElement::attributes(?string $namespaceOrPrefix = null, bool $isPrefix = false): ?SimpleXMLElement
public SimpleXMLElement::children(?string $namespaceOrPrefix = null, bool $isPrefix = false): ?SimpleXMLElement
public SimpleXMLElement::getDocNamespaces(bool $recursive = false, bool $fromRoot = true): array|false
}

Historique

Version Description
8.0.0 Les méthodes d'itération (SimpleXMLIterator::hasChildren(), SimpleXMLIterator::getChildren(), SimpleXMLIterator::current(), SimpleXMLIterator::key(), SimpleXMLIterator::next(),SimpleXMLIterator::rewind(), SimpleXMLIterator::valid()) ont été déplacées vers SimpleXMLElement.
8.0.0 La classe SimpleXMLIterator implémente désormais Stringable.