Skip to content

Latest commit

 

History

History
21 lines (18 loc) · 636 Bytes

0286.md

File metadata and controls

21 lines (18 loc) · 636 Bytes

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