to
), only valid in DOMDocument->save() and DOMDocument->saveXML() functions * LIBXML_NOENT - Substitute entities * LIBXML_NOERROR - Suppress error reports * LIBXML_NONET - Stop network access while loading documents * LIBXML_NOWARNING - Suppress warning reports * LIBXML_NOXMLDECL - Drop the XML declaration when saving a document * LIBXML_NSCLEAN - Remove redundant namespace declarations * LIBXML_PARSEHUGE - Set XML_PARSE_HUGE flag to relax any hardcoded limit from the parser. This affects limits like maximum depth of a document or the entity recursion, as well as limits of the size of text nodes. * LIBXML_XINCLUDE - Implement XInclude substitution * LIBXML_ERR_ERROR - Get recoverable errors * LIBXML_ERR_FATAL - Get fatal errors * LIBXML_ERR_NONE - Get no errors * LIBXML_ERR_WARNING - Get simple warnings * LIBXML_VERSION - Get libxml version (e.g., 20605 or 20617) * LIBXML_DOTTED_VERSION - Get dotted libxml version (e.g., 2.6.5 or 2.6.17) | | _ns_ | Optional. Specifies namespace prefix or URI. | | _is\_prefix_ | Optional. Specifies a boolean value. TRUE if _ns_ is a prefix, FALSE if _ns_ is a URI. Default is FALSE. | ## Technical Details | Return Value: | Returns a SimpleXMLElement object on success, FALSE on failure. | | --- | | PHP Version: | 5+ | * * * ## More Examples Assume we have the following XML file, "[note.xml](":
"; echo $xml->from . "
"; echo $xml->heading . "
"; echo $xml->body; ?> [Run Example Β»]( ## Example 2 Output the element name and data of each child node in the XML file: getName() . "
"; foreach($xml->children() as $child) { echo $child->getName() . ": " . $child . "
"; } ?> [Run Example Β»]( * * * [![Image 2: PHP SimpleXML Reference Manual]( PHP SimpleXML Reference Manual](
YouTip