ParsedDocument
A response body parsed into a DOM, with the decisions the parse made.
Those decisions — whether the document is XHTML, whether it was parsed as XML, whether it already carried an XML prolog, and what namespace prefix XPath expressions need — are all made while reading the document and all needed again when writing it back out. Carrying them together is what keeps the serializer from having to guess.
Synopsis
Section titled “Synopsis”final readonly class ParsedDocument
| Source | Util/FormPopulation/ParsedDocument.php |
Properties
Section titled “Properties”| Property | Type | Description |
|---|---|---|
$document | DOMDocument | readonly. |
$hadXmlProlog | bool | readonly. |
$isXhtml | bool | readonly. |
$parsedAsXml | bool | readonly. |
$xmlnsPrefix | string | readonly. Prefix XPath expressions need for HTML elements, “html:” or "". |
$xpath | DOMXPath | readonly. |
Constructor
Section titled “Constructor”__construct()
Section titled “__construct()”public function __construct(DOMDocument $document, DOMXPath $xpath, string $xmlnsPrefix, bool $isXhtml, bool $parsedAsXml, bool $hadXmlProlog): mixed
| Parameter | Type | Description |
|---|---|---|
$document | DOMDocument | |
$xpath | DOMXPath | |
$xmlnsPrefix | string | |
$isXhtml | bool | |
$parsedAsXml | bool | |
$hadXmlProlog | bool |
Returns mixed