Lag i XML
Jeg har et xml skema der ser sådan her ud:<?xml version="1.0" encoding="utf-8"?>
<AuctionInfos xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns:xsd="http://www.w3.org/2001/XMLSchema" xmlns="http://www.ww.se/sdfs/">
<auction>
<Channel>Fixed</Channel>
<LiveAuctionID>454</LiveAuctionID>
<Visits>20</Visits>
</ImgList>
<PromotionFlags>HomePage Highlight ShowCase</PromotionFlags>
<StartDate>2011-10-04T10:24:00+02:00</StartDate>
<EndDate>2011-10-07T10:24:00+02:00</EndDate>
</auction>
<Closed>false</Closed>
<Bids />
</AuctionInfos>
Har en kode der ser sådan her ud:
strURL = "https://sfsdf.seses.se"
Set objXMLhttp = Server.CreateObject("MSXML2.ServerXMLHTTP")
objXMLhttp.Open "GET", strURL
objXMLhttp.Send
strReturn = objXMLhttp.responseText
Set objXMLhttp = Nothing
Set objXMLdoc = Server.CreateObject( "MSXML2.DOMDocument.4.0" )
objXMLdoc.async = false
objXMLdoc.loadXML(strReturn)
if objXMLdoc.hasChildNodes then
set rootElement = objXMLdoc.documentElement
for each childNode in rootElement.childNodes
if ( childNode.baseName = "auction" ) then
auction = childNode.text
end if
next
else
Response.Write "error"
end if
Hvordan kommer jeg ned og for fat i det data der ligger under auction. Er f.eks. kun interesseret i værdien StartDate ?