xml dom object

Can you save an xmldomdocument as as string?
ingesAsked:
Who is Participating?
 
Dave_GreeneConnect With a Mentor Commented:
Dim oDoc As New DOMDocument

oDoc.load "c:\test.xml"  'load the DOM

strXML = oDoc.xml   'Put out the string

Msgbox strXML   'display contents

Set oDoc = nothing   'kill the DOM

oDoc.LoadXML strXML   're-load the DOM from string contents

MsgBox oDoc.xml   'display

0
 
Anthony PerkinsCommented:
Try,

Dim xmlDoc As String
Dim strXML As String

...

strXML = xmlDoc.xml
0
 
Dave_GreeneCommented:
<ping>

<<Correction>>

Dim xmlDoc As DOMDocument

0
 
ianouiiCommented:
are u referring to save it into the db as a string?

Yes, u can, do as Dave_Greene solution. when u want to insert it into the db, for instance, MSSQL 7.0, just make your field to be ntext as XML string is really huge....

good luck.

0
 
ingesAuthor Commented:
Thanks !!! Just what I needed!
0
Question has a verified solution.

Are you are experiencing a similar issue? Get a personalized answer when you ask a related question.

Have a better answer? Share it in a comment.

All Courses

From novice to tech pro — start learning today.