Jump to content
Charlotte

Read XML-file with ASP

Recommended Posts

Hi, This is my first topic in this forum and i hope that someone can help me = = = = = = = = = XML: <?xml version="1.0" encoding="utf-8"?><gallery><description>martens-design.be</description><album title="" thumbnail=""><description></description><image src="xxxxx.jpg" thumbnail="xxxxx_thumb.jpg"></image><image src="yyyyy.jpg" thumbnail="yyyyy_thumb.jpg"></image><image src="zzzzz.jpg" thumbnail="zzzzz_thumb.jpg"></image></album></gallery> = = = = = = = = = ASP: <%Set objXMLDoc = Server.CreateObject("Microsoft.XMLDOM")objXMLDoc.async = FalseobjXMLDoc.load("http://www.absdef.com/data/MyXML.xml")Set Root = objXMLDoc.documentElementSet NodeList = Root.getElementsByTagName("gallery/album/image")For i = 0 to NodeList.length -1 Set image = objXMLDoc.getElementsByTagName("src")(i) Set thumb = objXMLDoc.getElementsByTagName("thumbnail")(i) Response.Write image.text & " " & "<br>" Response.Write thumb.text & " " & "<br>"NextSet objXMLDoc = Nothing%> = = = = = = = = = ...but i've got nothing ...and this is what i want: xxxxx.jpg xxxxx_thumb.jpg <br>yyyyy.jpg yyyyy_thumb.jpg <br>zzzzz.jpg zzzzz_thumb.jpg <br> = = = = = = = = = Thankzzz Charlotte

Share this post


Link to post
Share on other sites

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

Loading...

×
×
  • Create New...