Quantcast
Channel: XML, System.Xml, MSXML and XmlLite forum
Viewing all articles
Browse latest Browse all 935

Access XMLnode withtout prefix

$
0
0

Hi,

I would like to access my xmlnode without prefix in vbscript using XMLDOM

Example, below xml (c:\sample1.xml)

<ns:bookid="bk101">
      <ns:author>Gambardella, Matthew</ns:author>
      <ns:title>XML Developer's Guide</ns:title>
      <ns:genre>Computer</ns:genre>
      <ns:price>44.95</ns:price>
      <ns:publish_date>2000-10-01</ns:publish_date>
      <ns:description>An in-depth look at creating applications
      with XML.</ns:description>
   </ns:book>

is it possible to access the node  without prefix 'ns:' using xmldom?

Example (vbs script) :

 Set oDoc= CreateObject( "MSXML2.DOMDocument" )
 oDoc.load "c:\sample1.xml"

Set oNode=oDoc.SelectSingleNode("//book/author")

sValue=onode.text  'should returns Gambardella, Matthew

Thanks

Rajeswari S



Viewing all articles
Browse latest Browse all 935

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>