473,394 Members | 1,734 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,394 software developers and data experts.

PHP to generate XML

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

Nov 28 '06 #1
3 6161
..oO(Damo)
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.
Is it enabled in your php.ini? Is it listed in the output of phpinfo()?

And why don't you use this extension instead?

XXX. DOM Functions
http://www.php.net/manual/en/ref.dom.php

Micha
Nov 28 '06 #2
I just found the XXX.DOM Functions and i've replaced it with

$doc = new DomDocument('1.0');

still getting fatal error undefined function DomDocument

my phpinfo says XML support is active

Any ideas

Michael Fesser wrote:
.oO(Damo)
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.

Is it enabled in your php.ini? Is it listed in the output of phpinfo()?

And why don't you use this extension instead?

XXX. DOM Functions
http://www.php.net/manual/en/ref.dom.php

Micha
Nov 28 '06 #3
Have you removed the semicolon from the "extension=php_domxml.dll" line in
your php.ini file? Have you read the manual on how to enable this extension?

--
Tony Marston
http://www.tonymarston.net
http://www.radicore.org

"Damo" <co***********@gmail.comwrote in message
news:11**********************@n67g2000cwd.googlegr oups.com...
>I just found the XXX.DOM Functions and i've replaced it with

$doc = new DomDocument('1.0');

still getting fatal error undefined function DomDocument

my phpinfo says XML support is active

Any ideas

Michael Fesser wrote:
>.oO(Damo)
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.

Is it enabled in your php.ini? Is it listed in the output of phpinfo()?

And why don't you use this extension instead?

XXX. DOM Functions
http://www.php.net/manual/en/ref.dom.php

Micha

Nov 29 '06 #4

This thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

0
by: Almoni | last post by:
Hi, I have a few .xsd files that include each other in the following way: <!-- lets call the main schema file AA.xsd and it includes BB.xsd inside it --> <xs:schema...
3
by: Garry Dawkins | last post by:
Hey Frank, I'm a novice with this taking over someone elses application. I'm attempting to add a dataset to a page. I have the query to populate the page and I have the walkthrough instructions. ...
1
by: jtsree | last post by:
I am Using (Windows XP) Visual Studio.net 2003 professional edition working on VB.net language. I am bulding a very very simple project in VB.net where i connect to Access Database by dragging...
9
by: Henk Verhoeven | last post by:
We are not alone! "Where other MDA tools are generating programmingcode, Codeless chooses not to generate code at all". OK, phpPeanuts is not an MDA tool (it has no fancy modeling GUI). But it...
4
by: Stephen | last post by:
I need to generate input XML for another application by serialising classes defined in an XSD document. The code below will generate the XML I require but I need to generate this in memory rather...
10
by: Mamuninfo | last post by:
Hello, Have any function in the DB2 database that can generate unique id for each string like oracle, mysql,sybase,sqlserver database. In mysql:- select md5(concat_ws("Row name")) from...
1
by: A Traveler | last post by:
Hello, i am having this problem. The exact error message is: "Unable to generate code for a value of type 'System.Web.UI.Page'. This error occurred while trying to generate the property value for...
5
by: pete | last post by:
Help, I can not find this data wizard in my toolbox under data. To generate a dataset 1.. From the Data menu, choose Generate DataSet. Tip If you do not see the Data menu, click in the...
0
by: ward | last post by:
Greetings. Ok, I admit it, I bit off a bit more than I can chew. I need to complete this "Generate Report" page for my employer and I'm a little over my head. I could use some additional...
2
by: bthubbard | last post by:
This may not be the best group in which to post this. If there is a better location please direct me there. I have been experimenting with Sandcastle to generate CHM help file documentation for...
0
by: ryjfgjl | last post by:
If we have dozens or hundreds of excel to import into the database, if we use the excel import function provided by database editors such as navicat, it will be extremely tedious and time-consuming...
0
by: emmanuelkatto | last post by:
Hi All, I am Emmanuel katto from Uganda. I want to ask what challenges you've faced while migrating a website to cloud. Please let me know. Thanks! Emmanuel
0
BarryA
by: BarryA | last post by:
What are the essential steps and strategies outlined in the Data Structures and Algorithms (DSA) roadmap for aspiring data scientists? How can individuals effectively utilize this roadmap to progress...
1
by: nemocccc | last post by:
hello, everyone, I want to develop a software for my android phone for daily needs, any suggestions?
1
by: Sonnysonu | last post by:
This is the data of csv file 1 2 3 1 2 3 1 2 3 1 2 3 2 3 2 3 3 the lengths should be different i have to store the data by column-wise with in the specific length. suppose the i have to...
0
by: Hystou | last post by:
Most computers default to English, but sometimes we require a different language, especially when relocating. Forgot to request a specific language before your computer shipped? No problem! You can...
0
Oralloy
by: Oralloy | last post by:
Hello folks, I am unable to find appropriate documentation on the type promotion of bit-fields when using the generalised comparison operator "<=>". The problem is that using the GNU compilers,...
0
jinu1996
by: jinu1996 | last post by:
In today's digital age, having a compelling online presence is paramount for businesses aiming to thrive in a competitive landscape. At the heart of this digital strategy lies an intricately woven...
0
tracyyun
by: tracyyun | last post by:
Dear forum friends, With the development of smart home technology, a variety of wireless communication protocols have appeared on the market, such as Zigbee, Z-Wave, Wi-Fi, Bluetooth, etc. Each...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.