Easy Tutorial
❮ Func String Ord Php Xml Simplexml ❯

PHP Libxml Functions


PHP Libxml Introduction

Libxml functions and constants are used together with SimpleXML, XSLT, and DOM functions.


Installation

These functions require the Libxml package. Download at xmlsoft.org


PHP Libxml Functions

PHP: Indicates the earliest PHP version that supports the function.

Function Description PHP
libxml_clear_errors() Clears the Libxml error buffer. 5
libxml_get_errors() Retrieves an array of errors. 5
libxml_get_last_error() Retrieves the last error from Libxml. 5
libxml_set_streams_context() Sets the streams context for the next Libxml document load or write. 5
libxml_use_internal_errors() Disables Libxml errors and allows user to fetch error information as needed. 5

PHP Libxml Constants

Constant Description PHP
LIBXML_COMPACT Sets small nodes allocation optimization. This improves the performance of your application. 5
LIBXML_DTDATTR Sets default DTD attributes. 5
LIBXML_DTDLOAD Loads external subsets. 5
LIBXML_DTDVALID Validates with a DTD. 5
LIBXML_NOBLANKS Removes blank nodes. 5
LIBXML_NOCDATA Sets CDATA as text nodes. 5
LIBXML_NOEMPTYTAG Expands empty tags (e.g. <br/> to <br></br>). Only available in the DOMDocument->save() and DOMDocument->saveXML() functions. 5
LIBXML_NOENT Substitutes entities. 5
LIBXML_NOERROR Suppresses error reports. 5
LIBXML_NONET Stops network access while loading documents. 5
LIBXML_NOWARNING Suppresses warning reports. 5
LIBXML_NOXMLDECL Drops the XML declaration when saving a document. 5
LIBXML_NSCLEAN Removes superfluous namespace declarations. 5
LIBXML_XINCLUDE Uses XInclude substitution. 5
LIBXML_ERR_ERROR Gets recoverable errors. 5
LIBXML_ERR_FATAL Gets fatal errors. 5
LIBXML_ERR_NONE Gets no errors. 5
LIBXML_ERR_WARNING Gets simple warnings. 5
LIBXML_VERSION Gets the Libxml version (e.g. 20605 or 20617). 5
LIBXML_DOTTED_VERSION Gets the dotted version of Libxml (e.g. 2.6.5 or 2.6.17). 5
❮ Func String Ord Php Xml Simplexml ❯