Ciao a tutti sto cercando di fare una pagina (asp/vbscript) che legga dei dati all'interno dei un xml
di questo tipo
<Packages>
<Package>
<ID>163</ID>
<ParentDestinationID>7</ParentDestinationID>
<Code>2012SSHORIENT</Code>
<Name>Oriental Resort</Name>
<Accomodations>
<Accommodation>
<ID>164</ID>
<Name>Oriental Resort</Name>
<Code>HSSHORIENT</Code>
per farlo sto utilizzando questo codice
Set xmlDOM3 = Server.CreateObject("MSXML2.DOMDocument")
xmlDOM3.async = False
xmlDOM3.setProperty "ServerHTTPRequest", True
xmlDOM3.Load strdove3
Set itemList3 = xmlDOM3.getElementsByTagName("Packages")
effettuando una marea di cicli
arrivo direttamente al nodo di esempio
if(childGP2.nodeName = "Accomodations") then
for each childGP2_2 in childGP2.childNodes
if(childGP2_2.nodeName = "Accommodation") then
for each childGP2_3 in childGP2_2.childNodes
if(childGP2_3.nodeName = "Code") then
AccommodationCode=childGP2_3.text
exit for
end if
next
end if
next
end if
La domanda è questa
questa invece di fare una marea di cicli
per andarmi a prendere direttamente il valore Code all'intendo di Accommodation c'è qualche sistema?
grazie in anticipo