This method has been deprecated. Use AMP_DOM_Utils::get_content_from_dom_node() instead.

AMP_DOM_Utils::get_dom( string $document,  string $encoding = null )

Description #

Return a valid Dom\Document representing HTML document passed as a parameter.

See also

  • {@see AMP_DOM_Utils::get_content_from_dom_node()}

Parameters #


(string) (Required) Valid HTML document to be represented by a DomDocument.


(string) (Optional) Encoding to use for the content.

Default value:null

Return #

(AmpProjectDomDocument|false) Returns DomDocument, or false if conversion failed.

Changelog #

Version Description
0.7 Introduced.