Categories: MSDN / DotNet / Java / Scripts / Linux / PHP Ask - La ask - La Answer

result of XPATH

Dear ALL...
Does anyone have any idea abt the output of these XPAth...

/descendant::*
//quote/descendant::*
//quote/descendant::price

coz am trying to write it in the xml editor and the output comes a blank page with no result...

here wut am wrting :
<html>
<body>
<script type="text/vbscript">

set xmlDoc=CreateObject("Microsoft.XMLDOM")
xmlDoc.async="false"
xmlDoc.load("books.xml")

set nodes=xmlDoc.selectNodes("/descendant::*")

for each x in nodes
document.write("<xmp>")
document.write(x.xml)
document.write("</xmp>")
next

</script>
</body>
</html>


the quotelist.xml doc is as follow :

<?xml version="1.0" encoding="iso-8859-1"?>

<quote-list date="Nov. 4, 2001" time="9:32 AM EST">
<customer first-name="Kurt" last-name="Gabrick" id="9999"/>
<quote symbol="SRMC" name="Sierra Monitor Corporation">
<price amount="2.00" currency="USD"/>
<price amount="1.05" currency="GBP"/>
<price amount="4000.00" currency="MXP"/>
</quote>
<quote symbol="IBM" name="International Business Machines">
<price amount="135.00" currency="USD"/>
<price amount="67.75" currency="GBP"/>
<price amount="230000.00" currency="MXP"/>
</quote>
<quote symbol="ORCL" name="Oracle Corporation">
<price amount="15.00" currency="USD"/>
<price amount="7.75" currency="GBP"/>
<price amount="30000.00" currency="MXP"/>
</quote>
</quote-list>

Thanks in advance!!!!!
[1722 byte] By [silvester] at [2007-11-11 8:51:25]
# 1 Re: result of XPATH
I haven't used MSXML from VBScript, but the XPaths you give all evaluate fine in the XML editor. Which editor are you using?
geralds at 2007-11-11 23:28:29 >