You are here: PHP to generate XML « PHP Programming Language « IT news, forums, messages
PHP to generate XML

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]


Удаленная работа для программистов  •  Как заработать на Google AdSense  •  England, UK  •  статьи на английском  •  PHP MySQL CMS Apache Oscommerce  •  Online Business Knowledge Base  •  DVD MP3 AVI MP4 players codecs conversion help
Home  •  Search  •  Site Map  •  Set as Homepage  •  Add to Favourites

Copyright © 2005-2006 Powered by Custom PHP Programming

Сайт изготовлен в Студии Валентина Петручека
изготовление и поддержка веб-сайтов, разработка программного обеспечения, поисковая оптимизация