Dodo
DOm DOcument implementation
Loading...
Searching...
No Matches
Wikimedia\Dodo\DOMParser Class Reference

DOMParser. More...

+ Inheritance diagram for Wikimedia\Dodo\DOMParser:

Public Member Functions

Document parseFromString (string $string, string $type)
 

Static Public Member Functions

static _parseXml (Node $node, string $s, array $options)
 An XML parser ... is a construct that follows the rules given in XML to map a string of bytes or characters into a Document object.
 

Detailed Description

DOMParser.

See also
https://dom.spec.whatwg.org/#interface-domparser -forbid-undeclared-magic-properties

Member Function Documentation

◆ _parseXml()

static Wikimedia\Dodo\DOMParser::_parseXml ( Node $node,
string $s,
array $options )
static

An XML parser ... is a construct that follows the rules given in XML to map a string of bytes or characters into a Document object.

The spec then follows that up with: "Note: At the time of writing, no such rules actually exist."

Use the enabled-by-default PHP XMLReader class to do our parsing and cram it into a Document somehow, and hope we don't mangle things too badly.

See also
https://html.spec.whatwg.org/multipage/xhtml.html#xml-parser
Parameters
Node$nodeA node to which to append the parsed XML
string$sThe string to parse
array$options

◆ parseFromString()

Document Wikimedia\Dodo\DOMParser::parseFromString ( string $string,
string $type )
Parameters
string$string
string$type
Returns
Document

supposed to make a document describing it, instead of

Implements Wikimedia::IDLeDOM::DOMParser.


The documentation for this class was generated from the following file: