which two XPath expressions return the same result? <?xml version =”1.0” encoding =”UTF – 8”?

Given the following XML document, which two XPath expressions return the same result?
<?xml version =”1.0” encoding =”UTF – 8”?>
<bookstore>
<book category=”COOKING”>
<title lang=”en”>Everyday Italian Treats</title>
<author>George Smith</author>
<year>2009</year>
<price>30.00</price>
</book>
<book category=”WEB”>
<title lang=”en”>Getting Started with XPath</title>
<author>Tammy Lee</author>
<author>SergieLadloff</author>
<year>2011</year>
<price>49.99</price>
</book>
</bookstore>

Given the following XML document, which two XPath expressions return the same result?
<?xml version =”1.0” encoding =”UTF – 8”?>
<bookstore>
<book category=”COOKING”>
<title lang=”en”>Everyday Italian Treats</title>
<author>George Smith</author>
<year>2009</year>
<price>30.00</price>
</book>
<book category=”WEB”>
<title lang=”en”>Getting Started with XPath</title>
<author>Tammy Lee</author>
<author>SergieLadloff</author>
<year>2011</year>
<price>49.99</price>
</book>
</bookstore>

A.
bookstore/book/author

B.
bookstore/book/author/text ()

C.
bookstore/book/author/*

D.
bookstore//author/text ()

E.
//author/@text

F.
//author/*text



Leave a Reply 1

Your email address will not be published. Required fields are marked *