|
Posted by Gary Quiring on 10/12/58 11:16
On Wed, 18 May 2005 15:14:36 +0200, Azeus <IFARTINYOURGENERALDIRECTION@MP.com>
wrote:
>Try the following Dom syntax:
>And try to put some of your own stuff in it.
>
>
>/* Dom document */
>$dom = new DOMDocument("1.0","iso-8859-1");
>
>
>/* Create all elements */
>$response = $dom->createElement("response"); //root element
>$data = $dom->createElement("data");
>$parts = $dom->createElement("parts");
>$part = $dom->createElement("parts");
>$number = $dom->createElement("number","bla");
>$price = $dom->createElement("price", "9999");
>
>/* Now place them in the correct place in the tree */
>
>$response->appendChild($data);
>$data->appendChild($parts);
>$parts->appendChild($part);
>$part->appendChild($number);
>$part->appendChild($price);
>
>$dom->appendChild($response);
>
>echo $dom->saveXML();
>
What output should I see on the browser? I only see bla9999. It does not show
the XML file with the tags?
Thanks
Gary
Navigation:
[Reply to this message]
|