My xml file structure is like this
<?xml version="1.0" encoding="utf-8" ?>
<book>
<chapters>
<chapter id="1">
<page id="1" cid= "1" bid = "Book1">
<text>Hi</text>
</page>
<page id="2" cid= "1" bid = "Book1">
<text>Hi</text>
</page>
</chapter>
<chapter id="2">
<page id="1" cid= "2" bid = "Book1">
<text>Hi</text>
</page>
<page id="2" cid= "2" bid = "Book1">
<text>Hi</text>
</page>
</chapter>
<chapter id="3">
<page id="1" cid= "3" bid = "Book1">
<text>Hi</text>
</page>
<page id="2" cid= "3" bid = "Book1">
<text>Hi</text>
</page>
</chapter>
</chapters>
</book>
I want to get the specific page node by passing page id, and chapter id. How can I achieve this ?
Also, the book node contains too many chapter and each chapter contains many pages. So, I am using SAX parser to parse the content.