Flow PHP

XMLNodes

Read onlyYes
FinalYes

libxml builds each node in C, so no element, attribute or text of the document passes through PHP.

Methods

__construct()  : mixed
documents()  : Generator<int, DOMDocument>
Each element on the path as a UTF-8 document of its own, declaring every namespace it uses.
texts()  : Generator<int, string>
Each element on the path as its outer XML: the text of the document documents() yields for it.

Methods

__construct()

public __construct(string $xmlNodePath) : mixed
Parameters
$xmlNodePath : string

slash-separated element names from the root, '' for the root itself

documents()

Each element on the path as a UTF-8 document of its own, declaring every namespace it uses.

public documents(SourceStream $stream, int<1, max> $bufferSize) : Generator<int, DOMDocument>
Parameters
$stream : SourceStream
$bufferSize : int<1, max>

bytes read from the stream at a time

Return values
Generator<int, DOMDocument>

texts()

Each element on the path as its outer XML: the text of the document documents() yields for it.

public texts(SourceStream $stream, int<1, max> $bufferSize) : Generator<int, string>
Parameters
$stream : SourceStream
$bufferSize : int<1, max>

bytes read from the stream at a time

Return values
Generator<int, string>
On this page

Search results