I use items1.hasAttribute("ID") to check of attribute ID exists in node
items1 before I get the attribute value. But, why i got this error message
"object doesn't support this properties or method - run time erro '438'" when
it execute this at the if statement:
if items1.hasAttribute("ID")) then
' do something here ....
Else
'
end if
Thanks for any help.
-sl

Signature
Thanks.
Veign - 30 Oct 2004 01:37 GMT
What is item1? - Show the declaration.

Signature
Chris Hanscom - Microsoft MVP (VB)
http://www.veign.com
--
> I use items1.hasAttribute("ID") to check of attribute ID exists in node
> items1 before I get the attribute value. But, why i got this error message
[quoted text clipped - 10 lines]
>
> -sl
Mike D Sutton - 30 Oct 2004 10:49 GMT
> I use items1.hasAttribute("ID") to check of attribute ID exists in node
> items1 before I get the attribute value. But, why i got this error message
> "object doesn't support this properties or method - run time erro '438'" when
> it execute this at the if statement:
<code snipped>
Are you using VB.NET and the framework XML library or VB (Classic) and the MSXML DOM? I don't recall seeing the hasAttribute()
method on any MSXML interfaces and the only reference I can see to it in the MSDN is on XmlElement objects within the System.Xml
namespace.
If this is the case then you'll need to re-post to a .NET group such as those listed here: Http://EDais.mvps.org/DotNet/ if not then
post more of your code, in particular the declaration of "items1", how it's populated and which version of the XML library you are
using.
Hope this helps,
Mike
- Microsoft Visual Basic MVP -
E-Mail: EDais@mvps.org
WWW: Http://EDais.mvps.org/