<<< Previous question <<< Question ID#0286.md >>> Next question >>>
What is the work of simplexml_import_dom() in the following PHP code?
$dom = new domDocument;
$dom->loadXML('<email><from>John</from></email>');
$xml = simplexml_import_dom($dom);
echo $xml->from;
- A) It gets a SimpleXMLElement object from a DOM node.
- B) It gets a SimpleXMLElement object from an XML document.
- C) It gets the namespaces from XML data.
- D) It gets the name of a SimpleXML element.
Answer
Answer: A