How do u return a single node value from a xml documnet using php.
Javascript code for Windows server : WORKS OK
xmldoc = new ActiveXObject("Microsoft.XMLDOM");
xmldoc.async = false;
xmldoc.load("../xml/data.xml");
if(xmldoc.parseError.errorCode != 0){
window.location.replace("../error.shtml");}
else{
nodes = xmldoc.documentElement.childNodes;
var maxl = xmldoc.documentElement.childNodes.length-1;
calc.namevalue.value = xmldoc.selectSingleNode("//VALUE").text;
PHP DOES NOT RETURN VALUE JUST THE WORD ARRAY IN THE TEXT BOX- my lack of understanding here is very low, can anyone assit in the proper syntax????
<?php
session_start();
if(!$dom = domxml_open_file("../xml/data.xml")) {
echo "Error while parsing the document\n";
exit;
}
$root = $dom->document_element();
$xml_value = $root->get_elements_by_tagname("VALUE");
?>
<html>
<title>Edit an XML Article</title>
<body>
<input name="name" type="text" id="name" value="<?php echo $xml_value ?>" size="30">
</body>
</html>