Commit a61b4c24 authored by Jerome Mariette's avatar Jerome Mariette
Browse files

No commit message

No commit message
parent 2ff82f20
......@@ -315,21 +315,30 @@ class tx_nG6_eid {
// If no parent yet, this is the root
if (count($doc->getElementById($parentl)) == 0) {
$current_node = $doc->createElement('node');
$current_node->setAttribute("id", "node_"+str_replace(".", "_", $mparts[1]));
$current_node->setAttribute("name", $mparts[2]);
$current_node->setAttribute("g", $mparts[4]);
$id = $doc->getElementById("data_root");
$id->appendChild($current_node);
$id->appendChild($current_node);
$attr_current_node = $doc->createAttribute("xml:id");
$current_node->appendChild($attr_current_node);
$t_current_node = $doc->createTextNode("node_"+str_replace(".", "_", $mparts[1]));
$attr_current_node->appendChild($t_current_node);
$current_node->setIdAttribute("xml:id", true);
$current_nodet = $doc->createTextNode('');
$current_nodet = $current_node->appendChild($current_nodet);
} else {
/*$current_node = $doc->createElement('node');
$current_node->setAttribute("id", "node_"+str_replace(".", "_", $mparts[1]));
$current_node = $doc->createElement('node');
$current_node->setAttribute("name", $mparts[2]);
$current_node->setAttribute("g", $mparts[4]);
$current_node = $doc->getElementById("node_"+$parentl).appendChild($current_node);
$id = $doc->getElementById("node_"+$parentl);
$id->appendChild($current_node);
$attr_current_node = $doc->createAttribute("xml:id");
$current_node->appendChild($attr_current_node);
$t_current_node = $doc->createTextNode("node_"+str_replace(".", "_", $mparts[1]));
$attr_current_node->appendChild($t_current_node);
$current_node->setIdAttribute("xml:id", true);
$current_nodet = $doc->createTextNode('');
$current_nodet = $current_node->appendChild($current_nodet); */
$current_nodet = $current_node->appendChild($current_nodet);
}
$xml_string = $doc->saveXML();
fwrite($fh, $line);
......
Supports Markdown
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment