Posted by Damo on 11/28/06 21:51
Hi
I'm trying to generate xml from a php program using this code:;
$queryexe="SELECT * FROM cust";
$doc = domxml_new_doc('1.0');
$root = $doc->createElement('root');
$root = $doc->appendChild($root);
while($row= odbc_fetch_row($queryexe))
{
foreach ($row as $fieldname => $fieldvalue) {
$child = $doc->createElement($fieldname);
$child = $occ->appendChild($child);
$value = $doc->createTextNode($fieldvalue);
$value = $child->appendChild($value);
} // foreach
} // while
// get completed xml document
$xml_string = $doc->dump_mem(true);
echo $xml_string;
This gives the following error:
Fatal error: Call to undefined function: domxml_new_doc() in .......
The domxml.dll is in the extensions folder of my php distribution so i
have no idea what the problem is.
Please help
Thanks
Navigation:
[Reply to this message]
|