Altova Mailing List Archives>Archive Index >microsoft.public.xml Archive Home >Recent entries [Thread Prev] >Thread Next - Re: ASP: Cannot read the attributes of my XML file (can read the tags) ASP: Cannot read the attributes of my XML file (can read the tags)To: NULL Date: 2/8/2008 3:47:00 AM Hi
The XML
<property id="757756" eid="368" bid="550" price="229950"
currency="GBP" poa="False" bedrooms="1" bathrooms="1" receptions="1"
gardens="0" garages="0" ptype="9" instructed="2007-01-15 00:00:00" >
<homeinformationpack>
<info>
<hip eer_c="0" eer_p="0" eir_c="0" eir_p="0" security="0"
market="True" ordered="30/12/1899"/>
</info>
</homeinformationpack>
<address>
<name>29</name>
<address_1>Northern Heights West Rd</address_1>
<address_2/>
<address_3>SomeTown</address_3>
<address_4/>
<address_5/>
<address_6/>
<postcode>N88 8AL</postcode>
</address>
...
</property>
my code
<%
Dim URL, count, objXML, i, counter
Set objXML = Server.CreateObject("Microsoft.XMLDOM")
objXML.setProperty "ServerHTTPRequest", True
objXML.async = False
objXML.Load(URL)
address_address_1 =
objXML.documentElement.childNodes(1).childNodes(1).text
..
%>
That all works but what is the ASP to read the attributes of the main
outer tag PROPERTY eg price, id,currency etc.
I cannot see this even if I dump the whole of the XML with
n00 = objXML.documentElement.text
--
zzapper
Best of VimTips
http://www.vim.org/tips/tip.php?tip_id=305
Dave
| ||||||
| Company | Legal | Press | Partners | Careers | Sitemap | Contact Us | Altova Blog | Mobile | Full Site | |||
|
