Home. 
.

transparent

transparent

transparent

Altova Mailing List Archives


Re: Attribitue value retrival

From: "Joe Fawcett" <joefawcett@---------.------>
To: NULL
Date: 2/1/2006 5:49:00 PM
<lreames@g...> wrote in message 
news:1138811117.434092.11760@g......
>I am new to XML, but not ASP.
>
> I have the following XML that I load via
>
> Dim xml
> Set xml = Server.CreateObject("Microsoft.XMLDOM")
> xml.async = False
> xml.loadXML xmldom.xml
>
> <deals><escanoffers><escanoffer offerid="3743" itemnumber="502022"
> upc="4300094509" dealamt="0.20" begindate="03/01/2006"
> enddate="03/30/2006" returnby="02/28/2006" selectionlength="14"
> maxretail="0.00" /></escanoffers></deals>
>
> I need to parse it, getting all the attributes out, using ASP.
>
> AHIA
> Larry...
>
Dim colAttList
Set colAttList = xml.selectNodes("/deals/escanoffers/escanoffer/@*")
You can then loop through the collection and retrieve the nodeName and 
nodeValue for each attribute.
If there's only one <escanoffer> in the document.
If there maybe more then:
Dim colEscanoffer
Set colEscanoffer = xml.selectNodes("/deals/escanoffers/escanoffer")

Then loop through each element and select "@*" and proceed as above.

-- 

Joe Fawcett (MVP - XML)

https://mvp.support.microsoft.com/profile=8AA9D5F5-E1C2-44C7-BCE8-8741D22D17A5




transparent
Print
Mail
Like It
Disclaimer
.

These Archives are provided for informational purposes only and have been generated directly from the Altova mailing list archive system and are comprised of the lists set forth on www.altova.com/list/index.html. Therefore, Altova does not warrant or guarantee the accuracy, reliability, completeness, usefulness, non-infringement of intellectual property rights, or quality of any content on the Altova Mailing List Archive(s), regardless of who originates that content. You expressly understand and agree that you bear all risks associated with using or relying on that content. Altova will not be liable or responsible in any way for any content posted including, but not limited to, any errors or omissions in content, or for any losses or damage of any kind incurred as a result of the use of or reliance on any content. This disclaimer and limitation on liability is in addition to the disclaimers and limitations contained in the Website Terms of Use and elsewhere on the site.

.
.

transparent

transparent