jojay Posted May 22, 2006 Share Posted May 22, 2006 Hi,I am in the learning process and I am not able to apply two elements as below: <script type=text/vbscript>set xmlDoc=CreateObject("Microsoft.XMLDOM")xmlDoc.async="false"xmlDoc.load("books.xml")set nodes=xmlDoc.selectNodes[B]("/bookstore/book[price>35]/price|/book/title")[/B]for each x in nodes document.write("<xmp>") document.write(x.xml) document.write("</xmp>")next</SCRIPT> Can someone please tell how I will do this? thanks. Link to comment Share on other sites More sharing options...
kgw Posted May 29, 2006 Share Posted May 29, 2006 Hi Jojay,What are you trying to return? If you want to return the price and title you can use the following XPath:/bookstore/book[price>35]/(price | title)The result is something like this:<title lang="en">XQuery Kick Start</title><price>50.00</price><title lang="en">Learning XML</title><price>40.00</price> Link to comment Share on other sites More sharing options...
Recommended Posts
Create an account or sign in to comment
You need to be a member in order to leave a comment
Create an account
Sign up for a new account in our community. It's easy!
Register a new accountSign in
Already have an account? Sign in here.
Sign In Now