Hi,
I am using the following function to access a nodes value from an XML
file. It works fine until it discovers a empty tag. I would like to
have the option of leaving some tags empty for my script.
..
..
..
function foutput_contact ($node_name) {
$xml_document = domxml_open_file('xml/contacts.xml');
if ($xml_document) {
$nodes= $xml_document->get_elements_by_tagname($node_name);
$nodeCount = count($nodes);
$node = $nodes[0];
if ($node) {
$node = $node->first_child();
return $node->node_value();
}
}
}
The error is returned at the line 'return $node->node_value()' but
only when I use an empty node. Can this script be modified to allow
empty nodes? Cheers
Burnsy