This is the sample xml document :
<bookstore>
<book category="COOKING">
<title lang="english">Everyday Italian</title>
<author>Giada De Laurentiis</author>
<year>2005</year>
<price>300.00</price>
</book>
<book category="CHILDREN">
<title lang="english">Harry Potter</title>
<author>J K. Rowling </author>
<year>2005</year>
<price>625.00</price>
</book>
</bookstore>
I want to extract the text without specifying the elements how can i do this , because i have 10 such documents. I want so because my problem is that user is entering some word which I don't know , it has to be searched in all of the 10 xml documents in their respective text portions. For this to happen I should know where the text lies without knowing about the element. One more thing that all these documents are different.
Please Help!!
See Question&Answers more detail:os