PHP 5 libxml Functions

PHP libxml Introduction


The 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 version of PHP that supports the function.
FunctionDescription
libxml_clear_errors()Clear libxml error buffer
libxml_get_errors()Retrieve array of errors
libxml_get_last_error()Retrieve last error from libxml
libxml_set_streams_context()Set the streams context for the next libxml document load or write
libxml_use_internal_errors()Disable libxml errors and allow user to fetch error information as needed

PHP 5 Predefined libxml Constants

FunctionDescription
LIBXML_COMPACTSet small nodes allocation optimization. This may improve the application performance
LIBXML_DTDATTRSet default DTD attributes
LIBXML_DTDLOADLoad external subset
LIBXML_DTDVALIDValidate with the DTD
LIBXML_NOBLANKSRemove blank nodes
LIBXML_NOCDATASet CDATA as text nodes
LIBXML_NOEMPTYTAGChange empty tags (e.g. <br/> to <br></br>), only available in the DOMDocument->save() and DOMDocument->saveXML() functions
LIBXML_NOENTSubstitute entities
LIBXML_NOERRORDo not show error reports
LIBXML_NONETStop network access while loading documents
LIBXML_NOWARNINGDo not show warning reports
LIBXML_NOXMLDECLDrop the XML declaration when saving a document
LIBXML_NSCLEANRemove excess namespace declarations
LIBXML_XINCLUDEUse XInclude substitution
LIBXML_ERR_ERRORGet recoverable errors
LIBXML_ERR_FATALGet fatal errors
LIBXML_ERR_NONEGet no errors
LIBXML_ERR_WARNINGGet simple warnings
LIBXML_VERSIONGet libxml version (e.g. 20605 or 20617)
LIBXML_DOTTED_VERSIONGet dotted libxml version (e.g. 2.6.5 or 2.6.17)

Credit: www.w3schools.com

PHP 5 libxml Functions PHP 5 libxml Functions Reviewed by webmission on 11:46 Rating: 5

No comments:

Powered by Blogger.