PHP » GoLang |
login |
register |
about
|
GoLang simplexml_load_file
request it (393)
GoLang replacement for PHP's simplexml_load_file
[edit | history]
simplexml_load_file(PHP 5, PHP 7) simplexml_load_file — Interprets 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 Warning
This function may
return Boolean 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
|
more
Recently updated
more
Most requested
more
Last requests
|