I am giving out an XML document as a response to request send by a client in which i advertise i have these categories of books.The clients wish that if he request with some id= Cooking the response XML should only have the elements within <Cooking> </Cooking> tags.How can i do this?
following is a sample response i send out.
<bookstore>
<Cooking>
<book category="COOKI NG">
<title lang="en">Every day Italian</title>
<author>Giada De Laurentiis</author>
<year>2005</year>
<price>30.00</price>
</book>
</Cooking>
<Children>
<book category="CHILD REN">
<title lang="en">Harry Potter</title>
<author>J K. Rowling</author>
<year>2005</year>
<price>29.99</price>
</book>
</Children>
<Web>
<book category="WEB">
<title lang="en">Learn ing XML</title>
<author>Erik T. Ray</author>
<year>2003</year>
<price>39.95</price>
</book>
</Web>
</bookstore>
following is a sample response i send out.
<bookstore>
<Cooking>
<book category="COOKI NG">
<title lang="en">Every day Italian</title>
<author>Giada De Laurentiis</author>
<year>2005</year>
<price>30.00</price>
</book>
</Cooking>
<Children>
<book category="CHILD REN">
<title lang="en">Harry Potter</title>
<author>J K. Rowling</author>
<year>2005</year>
<price>29.99</price>
</book>
</Children>
<Web>
<book category="WEB">
<title lang="en">Learn ing XML</title>
<author>Erik T. Ray</author>
<year>2003</year>
<price>39.95</price>
</book>
</Web>
</bookstore>
Comment