General discussion

Locked

Creating XML documents using VB

By dwtk9 ·
Hi everyone,

My name is Derek. I want to create an XML doc using VB. The contents of the XML should be based on a specified database. Currently I use the following methods
(conn.open "filedsn=cust"
charRS.open "select * from Customer", conn, adOpenForwardOnly, adLockReadOnly, -1
Set rdataXML = New DOMDocument
charRS.save "C:\testxml2.xml", adPersistXML)

This doesn't really help me coz I have problem binding the XML in my HTML file even when i use the binding tag like
<XML ID="Customer" SRC="testxml.xml"></XML>.

Is there anything wrong with my code or even better please suggest how I can write a better VB code to get data from a db and then construct an XML doc

Contact me at dwtk9@yahoo.com if there's any prob. Thanks!!!!

This conversation is currently closed to new comments.

4 total posts (Page 1 of 1)  
| Thread display: Collapse - | Expand +

All Comments

Collapse -

Creating XML documents using VB

by BrianHarris In reply to Creating XML documents us ...

The XML output from ADO is funky.

We wrote a custom methods that you could pass in a recordset and would return an XML Document. While I don't want to post a lot of code, it really wasn't too hard. The performance isn't great if you retrieve a lot of data but its passable.

Basically, write a method that accepts a Recordset and then loops through the Records and Fields and appends them to an XML Document either as nodes or attributes. I think we might have had 20-30 lines of code to do this.

Good luck!

Collapse -

Creating XML documents using VB

by dwtk9 In reply to Creating XML documents us ...

Sorry but my colleagues helped me out on this already. I'm posting a new question.

Collapse -

Creating XML documents using VB

by dwtk9 In reply to Creating XML documents us ...

Hi All,
Sorry but I'm kinda of new to this programming stuff it would be great if you could e-mail me some sample codes with clear explanation. thanks

Collapse -

Creating XML documents using VB

by dwtk9 In reply to Creating XML documents us ...

This question was closed by the author

Back to Web Development Forum
4 total posts (Page 1 of 1)  

Related Discussions

Related Forums