Re[2]: [PHP] XML dom encode

2002-10-04 Thread Tom Rogers
Hi, Untested but it would be something like this: 0){ //Create DomDocument ob_start(); echo ''; $buffer = ob_get_contents(); ob_end_clean(); $doc = domxml_open_mem($buffer); //Get root node $root = $doc->document_element();

Re: [PHP] XML dom encode

2002-10-04 Thread Tom Rogers
Hi, Friday, October 4, 2002, 10:14:31 PM, you wrote: DÖJ> header("Content-Type: application/xml"); DÖJ> //query database records DÖJ> $connection = mysql_connect("localhost", "user", "pass") or die("can't connect"); DÖJ> mysql_select_db("webbish"); DÖJ> $query = "SELECT id, title, artist F

[PHP] XML dom encode

2002-10-04 Thread Davíð Örn Jóhannsson
0){ //Create DomDocument $doc = new_xmldoc("1.0"); //Add root note $root = $doc->add_root("cds"); //Iterate through result set while(list($id, $title, $artist) = mysql_fetch_row($result)){