|
-
Jun 3rd, 2006, 01:16 AM
#1
Thread Starter
PowerPoster
ASP & XML
Hey All
Im just learning all of this and im stuck when trying to use an XML file in ASP.
My XML File looks like this
Quote -
<?xml version="1.0" encoding="utf-8" ?>
- <rsp stat="ok">
- <photoset id="1651651651" primary="169818116951">
<photo id="51651" secret="651651" server="49" title="a title" isprimary="0" />
<photo id="561651" secret="16516198" server="54" title="another title" isprimary="1" />
</photoset>
</rsp>
How do i get the "ID" portion of the photo tag into an ASP Variable?
thanks for any help
b
-
Jun 6th, 2006, 08:51 AM
#2
Re: ASP & XML
Beacon? Beacon! How long has it been? 
VB Code:
set oXML = Server.CreateObject("Microsoft.XMLDOM")
oXML.Load("Your xml file")
oXML.setProperty "SelectionLanguage", "XPath"
set oXMLNodes = oXML.SelectNodes("/rsp/photoset/photo/@id")
Note that since there are two photo tags, you'll get two values returned, so you need to loop through oXMLNodes.
Now come over to chit chat and say hello to people who don't know you.
Posting Permissions
- You may not post new threads
- You may not post replies
- You may not post attachments
- You may not edit your posts
-
Forum Rules
|
Click Here to Expand Forum to Full Width
|