Clase SimpleXMLElement

(PHP 8)

Introducción

Representa un elemento en un documento XML.

Sinopsis de la Clase

class SimpleXMLElement {
/* Métodos */
public __construct(
    string $data,
    int $options = 0,
    bool $dataIsURL = false,
    string $namespaceOrPrefix = "",
    bool $isPrefix = false
)
public addAttribute(string $name, string $value = ?, string $namespace = ?): void
public addChild(string $name, string $value = ?, string $namespace = ?): SimpleXMLElement
public asXML(string $filename = ?): mixed
public attributes(string $ns = null, bool $is_prefix = false): SimpleXMLElement
public children(string $ns = ?, bool $is_prefix = false): SimpleXMLElement
public count(): int
public getDocNamespaces(bool $recursive = false, bool $from_root = true): array
public getName(): string
public getNamespaces(bool $recursive = false): array
public hasChildren(): bool
public key(): string
public next(): void
public rewind(): void
public __toString(): string
public valid(): bool
public xpath(string $path): array
}

Tabla de contenidos