Home. 
.

transparent

transparent

transparent

Altova Mailing List Archives


Re: Attribitue value retrival

From: Martin Honnen <mahotrash@-----.-->
To: NULL
Date: 2/1/2006 6:57:00 PM

lreames@g... wrote:

> 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")

Make sure you have at least MSXML 3 and then use a version specific 
program id e.g. for MSXML 3
   Set xml = Server.CreateObject("Msxml2.DOMDocument.3.0")
that way you can be sure what kind of XPath support you are going to have.

> xml.async = False
> xml.loadXML xmldom.xml

I don't get why you want to do that, you have on DOM document but need 
to load it into another? It might make sense if you need a copy to 
manipulate but you can directly do
   xml.load xmldom
in that case, no need to serialize to string and then load from a string.

> I need to parse it, getting all the attributes out, using ASP.

If you want all attributes then you can use XPath and selectNodes e.g.
   xml.setProperty "SelectionLanguage", "XPath"
   Set attributeNodes = xml.selectNodes(_
     "//*/@*")
   For Each attribute in attributeNodes
     ' access attribute.nodeValue or attribute.value
   Next

-- 

	Martin Honnen --- MVP XML
	http://JavaScript.FAQTs.com/


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