PDA

View Full Version : Xml php/sax


TheJoey
05-10-2010, 02:35 PM
Hey guys i have a file which is


<xml>

<root>
<bookname> abc 123</bookname>
<bookauthor>greg </bookauthor>
</root>

<root>
<bookname>blah blah </bookname>
<bookauthor>grey again </bookauthor>
</root>

<root>
<bookname>dont know </bookname>
<bookauthor>testing </bookauthor>
</root>

</xml>

how can i use sax/php to
so it is displayed differently.. im very new to sax.
for example so it was
+-xml
| +-root
| | +bookname
| | +bookauthor

and also want to display the values next to them in that format if possible