![]() |
![]() | ![]() | ![]() | Altova Mailing List Archives>Archive Index >microsoft.public.xml Archive Home >Recent entries [Thread Prev] >Thread Next - Re: parsing childs parsing childsTo: NULL Date: 6/3/2006 5:42:00 AM
Hi all,
I dont know why but XML dont likes me, again I am sitting here and try
to get some data from a very easy xml file. I really dont get it. I
have invested more than 2 weeks looking at different sites, books ( I
have 2 of them ) and so on - but it seams xml is not my friend. Can
someone tell me why it is that complicated? I code since 25 years and
dont get it to run. Perhaps I do a big error in all my thinkings.
Anyway, perhaps someone can help me - that would be very nice
Please see the XML file below
<response stat="ok">
<photos page="1">
<photo id="152641843" />
<photo id="152641841" />
</photos>
</response>
I need to loop through all the childs from the node "photos"
I tried with nextSibling, and many other things - but I always get
"Object doesn't support this property or method" or other errors.
this is my code
Dim photos
Set photos = xmlDom.selectNodes ("//photos")
for each photo in photos
for xi=0 to 2
response.write(photo.SelectSingleNode("photo/@id").Value & "<br />")
photo.nextSibling
next
next
this code works, but only gives me back 1 photo id?
I think it is because I loop through the nodes - and there is only 1
node
but how i can loop through all the childs of the given node?
I think this must be easy - but it seams not to
thanks for any tipp or hint
Andy
| ![]() | ![]() | ![]() |
| Company | Legal | Press | Partners | Careers | Sitemap | Contact Us | Altova Blog | |||||
|
