|
SimpleXMLElement::__constructCreates a new SimpleXMLElement object Description
final public SimpleXMLElement::__construct
( string
$data
[, int $options = 0
[, bool $data_is_url = false
[, string $ns = ""
[, bool $is_prefix = false
]]]] )Creates a new SimpleXMLElement object. Parameters
Return Values
Returns a SimpleXMLElement object representing
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 Create a SimpleXMLElement object
<?php The above example will output: PHP: Behind the Parser
Example #2 Create a SimpleXMLElement object from a URL
<?php Changelog
See Also
|