
|
Introduction
on using PHP to create XML documents You can create XML documents using the PHP DOM. If you have worked earlier in any script or language using DOM then you can very well work with the PHP DOM too. As with other language you have to first create a new document object.
_______________________________________________ The DOM has lot of function like createElement, createTextNode etc which can be used to create an element and to create a text node for an element. Then you can use add the textnode to an element and that element to another element and so on using the appendChild function. Suppose you have create a new document object using the following command, $domobj = new DomDocument(); Then you can create an element using command like, $book
= $domobj->createElement("book"); Now to add the elements to the document object, you have to perform the following commands, $author->appendChild($authtext); Now you are free to save that XML file or print it out on the screen.
What to expect from HTML 5 (InfoWorld via Yahoo! News) Reed's Inc. and Jones Soda Co. Enter Into Letter of Intent Regarding Potential Merger; Jones CEO to Depart (Marketwire) Reed's Inc. and Jones Soda Co. Enter Into Letter of Intent Regarding Potential Merger; Jones CEO to Depart (Business Wire via Yahoo! Finance)
|
Cisco
CCNA Certification Video Tutorial Guide - Learn How to Pass the Cisco
CCNA 640-802 Exam... Guaranteed!
| |||
|
| ||||