Dear All, I am getting stuck with this for a few days :(
and about to decide to give up or find an alternative, but I want to give it a last try :(
My question is how can we write an Xpath expression to get all attributes from an element with ID begins with "ext"
I have tried something like blow, but did not work :(
Below is my XML file
and about to decide to give up or find an alternative, but I want to give it a last try :(
My question is how can we write an Xpath expression to get all attributes from an element with ID begins with "ext"
I have tried something like blow, but did not work :(
Code:
//@*[starts-with(@ID,"ext")]
Code:
<?xml version="1.0"?> <books> <book ID="extension1" available="yes"> <title>Book Title 1</title> <price>100 - 200</price> </book> <book ID="Book001" available="no"> <title>Book Title 2</title> <price>400 - 500</price> </book> <book ID="extension2"> <title>Book Title 3</title> <price>abc - 500</price> </book> <book available="soon"> <title>Book Title 5</title> <price>a100 - c200</price> </book> <book ID="Book003" available="yes"> <title>Book Title 6</title> <price>c100 - 200</price> </book> </books>
Comment