Hi all,
Can we parse Xhtml file using DOM XML parser of PHP. What i really want is this,
I have an xhtml file and i want to edit/delete some of the contents in that xhtml file. Xhtml file is organized into parts using <div> tags.
this is how it looks like,
<div id="book1">
this is the book introduction part.
<div id="part1">
This is the part introduction
<div id="sec1">
This is the section intrduction
<div id="subSec1">This is the sub section introduction</div>
</div>
</div>
</div>
now what i want is to get the contents that resides inside the <div> tag and edit / delete that content. Which <div> tag to choose, is depending on the parameter i passes and the parameter i pass to the script will hold the <div> id . So according to that i know which <div> tag to choose.
Can i do this using XML parser.
All the comments are really welcome. If someone know a better to do this please post u r comments.
Thanx in advance,
Regards,
Niroshan