simplexml_load_stringInterprets a string of XML into an object Description
SimpleXMLElementfalse simplexml_load_string(
string $data ,stringnull $class_name = SimpleXMLElement::class,int $options = 0,string $namespace_or_prefix = "",bool $is_prefix = false ) Takes a well-formed XML string and returns it as 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 string
The above example will output: SimpleXMLElement Object ( [title] => Forty What? [from] => Joe [to] => Jane [body] => I know that's the answer -- but what's the question? )
At this point, you can go about using See Also
|