xpath and asp - javascript

Results 1 to 2 of 2

Thread: xpath and asp - javascript

  1. #1
    Join Date
    Dec 1969

    Default xpath and asp - javascript

    &nbsp;<BR>I am trying to display an xml doc<BR><BR>I have loaded the doc<BR><BR>var xmlDoc = new ActiveXObject("msxml2.DOMDocument.3.0");<BR>xmlDoc .async = false;xmlDoc.resolveExternals = false;xmlDoc.validateOnParse = false;<BR>xmlDoc.load("area.xml");<BR><BR>i have run the xpath query<BR>var nH=xmlDoc.selectNodes("/xml/rs:data/z:row[@City=&#039;Manchester&#039;]")<BR><BR><BR>and by <BR>alert(nH.length)<BR>I know that I have succeeded here<BR><BR>but i want to display the attributes, and i cant see how<BR>if trying to display the tag text i would use<BR><BR>nH.item(0).text<BR><BR><BR>but i cant manage to display the attributes<BR><BR>the xml nodes i have selected is here<BR><BR>&#060;z:row Location_Key="10" City="Manchester" State_Cntry_Key="28" State_Cntry_Name="New Hampshire" Area_Key="1" Area_Name="United States" /&#062; <BR><BR>The code is written in javascript<BR><BR>thanks in advance<BR><BR><BR><BR>

  2. #2
    Join Date
    Dec 1969

    Default RE: xpath and asp - javascript

    node.item(0).attributes(index).value<BR><BR>IIRC, of course, but the docs have it covered. if you don&#039;t have the docs, well, *** are you thinking??<BR><BR>http://msdn.microsoft.com/xml/ - download the SDK and keep a shortcut handy - you&#039;ll need it again.

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts