|
Home
iRate! IceMelon IM Tutorials Headlines CoolSites PHP Functions |
|
Most Referenced Functions » google_pagerank() » preg_replace() » imagecreatefrompng() » site_pageranks() » imagepng() » imagedestroy() » imagestring() » imagecolorallocate() » htmlentities() » preg_match() » fopen() » header() » getimagesize() » preg_match_all() » session_start() » htmlspecialchars() » ob_start() » ob_flush() » strstr() » flush() » strpos() » setcookie() » str_replace() » array2vars() » nl2br() » preg_split() » ereg() » ereg_replace() » urlencode() » readgzfile() Become a sponsor for $15/month. Link is sitewide - PR5 homepage, 20+ PR4 pages, 90+ PR3 pages. Email dave[AT]icemelon[D0T]c0m. |
PHP Functions
Function: domxml_open_mem (PHP 4 >= 4.2.1, PECL) domxml_open_mem -- Creates a DOM object of an XML documentDescriptionDomDocument domxml_open_mem ( string str [, int mode [, array &error]] )The function parses the XML document in the given string. Parameters
str The contents of the XML file. modeThis optional parameter can be used to change the behavior of this function. You can use one of the following constants for it: DOMXML_LOAD_PARSING (default), DOMXML_LOAD_VALIDATING or DOMXML_LOAD_RECOVERING . You can add to it also DOMXML_LOAD_DONT_KEEP_BLANKS , DOMXML_LOAD_SUBSTITUTE_ENTITIES and DOMXML_LOAD_COMPLETE_ATTRS by bitwise or . errorIf used, it will contain the error messages. error must be passed in by reference . Return ValuesReturns a DomDocument instance of the given XML contents. Examples
Example 1. Opening an XML document in a string
<?php
include("example.inc");
if (!$dom = domxml_open_mem($xmlstr)) {
echo "Error while parsing the document\n";
exit;
}
$root = $dom->document_element();
?>
Related Function(s) |