PHP Libxml
Introduction to PHP Libxml
Libxml functions and constants are used with SimpleXML, XSLT, and DOM functions.
Installation
These functions require the Libxml package. Download at xmlsoft.org
PHP Libxml Function
PHP: Indicates the earliest PHP version that supports this function.
Function | Description | PHP |
---|---|---|
libxml_clear_errors() | Clear Libxml error buffer. | 5 |
libxml_get_errors() | Retrieve the error array. | 5 |
libxml_get_last_error() | Retrieve the last error from Libxml. | 5 |
libxml_set_streams_context() | Set the streams context for the next time a Libxml document is loaded or written. | 5 |
libxml_use_internal_errors() | Disable Libxml errors, allowing users to read error information on demand. | 5 |
PHP Libxml Constants
Function | Description | PHP |
---|---|---|
LIBXML_COMPACT | Set small node allocation optimization. Will improve application performance. | 5 |
LIBXML_DTDATTR | Set the default DTD attributes. | 5 |
LIBXML_DTDLOAD | Loads an external subset. | 5 |
LIBXML_DTDVALID | Validate via DTD. | 5 |
LIBXML_NOBLANKS | Delete empty nodes. | 5 |
LIBXML_NOCDATA | Set CDATA as a text node. | 5 |
LIBXML_NOEMPTYTAG | Change the empty tag (for example, <br/> to <br></br>). Available only in the DOMDocument->save() and DOMDocument->saveXML() functions. | 5 |
LIBXML_NOENT | Alternative entity. | 5 |
LIBXML_NOERROR | Do not display error reports. | 5 |
LIBXML_NONET | Stop network access while loading the document. | 5 |
LIBXML_NOWARNING | Do not display warning reports. | 5 |
LIBXML_NOXMLDECL | Undo the XML declaration when saving the document. | 5 |
LIBXML_NSCLEAN | Remove extra namespace declarations. | 5 |
LIBXML_XINCLUDE | Use XInclude substitution. | 5 |
LIBXML_ERR_ERROR | Get a recoverable error. | 5 |
LIBXML_ERR_FATAL | Getting a fatal error. | 5 |
LIBXML_ERR_NONE | Get no errors. | 5 |
LIBXML_ERR_WARNING | Get a simple warning. | 5 |
LIBXML_VERSION | Get Libxml version (e.g. 20605 or 20617) | 5 |
LIBXML_DOTTED_VERSION | Get the dotted Libxml version (for example: 2.6.5 or 2.6.17). | 5 |