SimpleXMLElement クラス

(PHP 5, PHP 7, PHP 8)

はじめに

XML ドキュメントの要素をあらわします。

クラス概要

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
}

変更履歴

バージョン説明
8.0.0SimpleXMLElement は、 Stringable, Countable, RecursiveIterator を新たに実装しました。

目次

To Top