Posted by Azeus on 11/03/76 11:16
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();
Navigation:
[Reply to this message]
|