The __construct() function creates a new SimpleXMLElement object.
final public SimpleXMLElement::__construct ( string $data [, int $options = 0 [, bool $data_is_url = FALSE [, string $ns = "" [, bool $is_prefix = FALSE ]]]] )
Parameter | Description |
---|---|
data | A well-formed XML string or the path or URL to an XML document if data_is_url is TRUE |
options | Optionally used to specify additional Libxml parameters. |
data_is_url | By default, data_is_url is FALSE. Use TRUE to specify that data is a path or URL to an XML document instead of string data. |
ns | Namespace prefix or URI. |
is_prefix | TRUE if ns is a prefix, FALSE if it's a URI; defaults to FALSE. |
Returns a SimpleXMLElement object representing data.