simplexml_load_fileInterprets an XML file into an object Description
SimpleXMLElement simplexml_load_file
( string
$filename
[, string $class_name = "SimpleXMLElement"
[, int $options = 0
[, string $ns = ""
[, bool $is_prefix = false
]]]] )Convert the well-formed XML document in the given file to an object. Parameters
Return Values
Returns an object of class SimpleXMLElement with
properties containing the data held within the XML document, or Errors/Exceptions
Produces an Tip
Use libxml_use_internal_errors to suppress all XML errors, and libxml_get_errors to iterate over them afterwards. Examples
Example #1 Interpret an XML document
<?php This script will display, on success: SimpleXMLElement Object ( [title] => Example Title ... ) At this point, you can go about using $xml->title and any other elements. See Also
|