La classe SimpleXMLElement

(PHP 5, PHP 7, PHP 8)

Introduction

Représente un élément du document XML.

Synopsis de la classe

classSimpleXMLElementimplementsStringable, Countable, RecursiveIterator {
public__construct(
    string$data,
    int$options = 0,
    bool$dataIsURL = false,
    string$namespaceOrPrefix = "",
    bool$isPrefix = false
)
publicaddAttribute(string$qualifiedName, string$value, ?string$namespace = null): void
publicaddChild(string$qualifiedName, ?string$value = null, ?string$namespace = null): ?SimpleXMLElement
publicasXML(?string$filename = null): string|bool
publicattributes(?string$namespaceOrPrefix = null, bool$isPrefix = false): ?SimpleXMLElement
publicchildren(?string$namespaceOrPrefix = null, bool$isPrefix = false): ?SimpleXMLElement
publiccount(): int
publicgetDocNamespaces(bool$recursive = false, bool$fromRoot = true): array|false
publicgetName(): string
publicgetNamespaces(bool$recursive = false): array
publichasChildren(): bool
publickey(): string
publicnext(): void
publicregisterXPathNamespace(string$prefix, string$namespace): bool
publicrewind(): void
publicvalid(): bool
publicxpath(string$expression): array|null|false
}

Historique

VersionDescription
8.0.0 La classe SimpleXMLElement implémente désormais Stringable, Countable et RecursiveIterator.

Sommaire

To Top