XML in Visual Basic 
Author Message
 XML in Visual Basic

I keep getting a "Object variable or With block variable not set"
or "Object
required" when assigning the object variable.

***** Here is the code *****
    Dim xmlDoc As New MSXML.DOMDocument
    Dim x As New MSXML.XMLDocument  ' This line is wrong. What is the
correct
syntax for the assigning the object variable to x
    xmlDoc.async = "false"
    xmlDoc.validateOnParse = True
    xmlDoc.Load (xmlFile)
    For Each x In xmlDoc.documentElement.childNodes
         ..... x.nodeName ......
    Next

I'm new to using XML, so any help would be appreciated.

Thanks in advance,
Daljit Singh

Sent via Deja.com http://www.*-*-*.com/
Before you buy.



Mon, 09 Sep 2002 03:00:00 GMT  
 XML in Visual Basic
have you tried this approach:

Dim x as MSXML.XMLDocument
set x = new MSXML.XMLDocument

cheers,
jonel

Quote:

> I keep getting a "Object variable or With block variable not set"
> or "Object
> required" when assigning the object variable.

> ***** Here is the code *****
>     Dim xmlDoc As New MSXML.DOMDocument
>     Dim x As New MSXML.XMLDocument  ' This line is wrong. What is the
> correct
> syntax for the assigning the object variable to x
>     xmlDoc.async = "false"
>     xmlDoc.validateOnParse = True
>     xmlDoc.Load (xmlFile)
>     For Each x In xmlDoc.documentElement.childNodes
>          ..... x.nodeName ......
>     Next

> I'm new to using XML, so any help would be appreciated.

> Thanks in advance,
> Daljit Singh

> Sent via Deja.com http://www.deja.com/
> Before you buy.



Mon, 09 Sep 2002 03:00:00 GMT  
 
 [ 2 post ] 

 Relevant Pages 

1. XML and Visual Basic

2. ANN: XML Support Added To Code Reports For Visual Basic

3. SAX XML CSV converter using visual basic 6

4. Visual Basic XML to Flash??

5. Visual Basic 6.0 Code - Reading XML

6. XML, XSLT, Databases, and Visual Basic Development.

7. ANN: XML Support Added To Code Reports For Visual Basic

8. XML, XSLT, Databases, and Visual Basic Development.

9. ANN: XML Support Added To Code Reports For Visual Basic

10. Visual Basic & XML

11. do Visual Basic 6.0 and Visual Basic .NET version beta Working Both

12. Difference between Visual Basic 6 and Visual Basic.Net

 

 
Powered by phpBB® Forum Software