Home > Archive > Visual Basic > October 2004 > XML - hasAttribute question
You are viewing an archived Text-only version of the thread.
To view this thread in it's original format and/or if you want to reply to
this thread please [click here]
| Author |
XML - hasAttribute question
|
|
|
| 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
--
Thanks.
| |
|
| What is item1? - Show the declaration.
--
Chris Hanscom - Microsoft MVP (VB)
http://www.veign.com
--
"sl" <sl@discussions.microsoft.com> wrote in message
news:F03CAE10-9758-4260-B524-A90EAECAA7FA@microsoft.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
> "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
> --
> Thanks.
| |
| Mike D Sutton 2004-10-30, 8:55 am |
| > 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/
|
|
|
|
|