Re: [xsl] MSXML4 DOM - how get context node attribute value?

Subject: Re: [xsl] MSXML4 DOM - how get context node attribute value?
From: Emmanouil Batsis <Emmanouil.Batsis@xxxxxxxxxxx>
Date: Wed, 13 Apr 2005 18:01:45 +0300
Hardy Merrill wrote:

I'm using MSXML4 DOM in an ASP page - I've pinpointed a specific node in
the document using selectSingleNode, but now I need to get the value of
the "datatype" attribute of that node. I'm having trouble with the
MSXML4 documentation - can someone tell me how to get the value of an
attribute for the context node?


This is an XSL list; please use it for XSL-specific questions in the future.

The selectNodes and selectSingleNode M$ extensions can only return elements nodes AFAIK, so you'll just have to retreive the target element, cast it to Element if needed by your language and use DOM methods (getAttribute etc) to retreive the attribute value.

Manos

Current Thread