DOMDocument::save

(PHP 5, PHP 7) Dumps the internal XML tree back into a file public int DOMDocument::save ( string $filename [, int $options ] ) Creates an XML document from the DOM representation. This function is usually called after building a new dom document from scratch as in the example below. Parameters: filename The path to the saved XML document. options

DOMDocument::saveHTML

(PHP 5, PHP 7) Dumps the internal document into a string using HTML formatting public string DOMDocument::saveHTML ([ DOMNode $node = NULL ] ) Creates an HTML document from the DOM representation. This function is usually called after building a new dom document from scratch as in the example below. Parameters: node Optional parameter to output a subset of the document

DOMDocument::relaxNGValidate

(PHP 5, PHP 7) Performs relaxNG validation on the document public bool DOMDocument::relaxNGValidate ( string $filename ) Performs » relaxNG validation on the document based on the given RNG schema. Parameters: filename The RNG file. Returns: Returns TRUE on success or FALSE on failure.

DOMDocument::loadHTMLFile

(PHP 5, PHP 7) Load HTML from a file public bool DOMDocument::loadHTMLFile ( string $filename [, int $options = 0 ] ) The function parses the HTML document in the file named filename. Unlike loading XML, HTML does not have to be well-formed to load. Parameters: filename The path to the HTML file. options Since PHP 5.4.0 and Libxml 2.

DOMDocument::loadXML

(PHP 5, PHP 7) Load XML from a string public mixed DOMDocument::loadXML ( string $source [, int $options = 0 ] ) Loads an XML document from a string. Parameters: source The string containing the XML. options Bitwise OR of the libxml option constants. Returns: Returns TRUE on success or FALSE on failure. If c

DOMDocument::registerNodeClass

(PHP 5 >= 5.2.0, PHP 7) Register extended class used to create base node type public bool DOMDocument::registerNodeClass ( string $baseclass, string $extendedclass ) This method allows you to register your own extended DOM class to be used afterward by the PHP DOM extension. This method is not part of the DOM standard. Parameters: baseclass The DOM class that you wan

DOMDocument::normalizeDocument

(PHP 5, PHP 7) Normalizes the document public void DOMDocument::normalizeDocument ( void ) This method acts as if you saved and then loaded the document, putting the document in a "normal" form. Returns: No value is returned. See also: » The DOM Specification - DOMNode::normalize() -

DOMDocument::loadHTML

(PHP 5, PHP 7) Load HTML from a string public bool DOMDocument::loadHTML ( string $source [, int $options = 0 ] ) The function parses the HTML contained in the string source. Unlike loading XML, HTML does not have to be well-formed to load. This function may also be called statically to load and create a DOMDocument object. The static invocation may be used when no DOMDocument properties need to be set prior to loading.

DOMDocument::importNode

(PHP 5, PHP 7) Import node into current document public DOMNode DOMDocument::importNode ( DOMNode $importedNode [, bool $deep ] ) This function returns a copy of the node to import and associates it with the current document. Parameters: importedNode The node to import. deep If set to TRUE, this method will recursively import the subtre

DOMDocument::getElementById

(PHP 5, PHP 7) Searches for an element with a certain id public DOMElement DOMDocument::getElementById ( string $elementId ) This function is similar to DOMDocument::getElementsByTagName but searches for an element with a given id. For this function to work, you will need either to set some ID attributes with DOMElement::setIdAttribute or a DTD which defines an attribute to be of type ID. In the later case, you will need t