function node_export_xml_import in Node export 7.3
Import callback.
1 string reference to 'node_export_xml_import'
File
- formats/
xml.inc, line 24 - The Node export XML format handler.
Code
function node_export_xml_import($code_string) {
// Check for "<?xml" at the start.
if (substr(ltrim($code_string), 0, 5) == "<?xml") {
// Decode the XML.
$xml_class = new NodeExportXmlDecoder();
$result = $xml_class
->decode($code_string);
// Convert the nodes into objects.
if (!isset($result['success'])) {
foreach ($result as $k => $v) {
$result[$k] = (object) $v;
}
}
return $result;
}
}