943,198 Members | Top Members by Rank

Ad:
  • ASP Discussion Thread
  • Unsolved
  • Views: 812
  • ASP RSS
Aug 12th, 2010
0

VBScript, loading xml object from a string

Expand Post »
Dear all,
i'm new in vbscript and i want to take a string from database and load it into xml dom object but i can't.
My code:

'Creating XML object
set xmlDoc=CreateObject("Microsoft.XMLDOM")
xmlDoc.async="false"
xmlDoc.load
MsgBox xmlDoc

for each x in xmlDoc.documentElement.childNodes
frmMyForm.timeinfo2.value=x.nodename
frmMyForm.timeinfo3.value=x.text
'document.write(x.nodename)
'document.write(": ")
'document.write(x.text)
next
Similar Threads
Reputation Points: 10
Solved Threads: 0
Newbie Poster
amer.m is offline Offline
4 posts
since Jun 2010
Aug 13th, 2010
0
Re: VBScript, loading xml object from a string
xmlDoc.load is used to load an exisisting XML file. Since you want to load it from a scring, you need to use xmlDow.loadXML instead.

Refer to:
http://www.devguru.com/technologies/...t_loadxml.html
Reputation Points: 116
Solved Threads: 243
Veteran Poster
hielo is offline Offline
1,123 posts
since Dec 2007
Aug 15th, 2010
0
Re: VBScript, loading xml object from a string
thnx for replying , but i tried this method loadXML and got the same o/p
Reputation Points: 10
Solved Threads: 0
Newbie Poster
amer.m is offline Offline
4 posts
since Jun 2010
Aug 15th, 2010
0
Re: VBScript, loading xml object from a string
Quote ...
...I want to take a string from database and load it into xml dom object but i can't.
You need to verify that your string is actually a valid xml string. Look at the example on the url I provided earlier. Notice that the variable XMLString has a "complete" xml string. You need to do the same. Most likely you are trying to initialize it with an invalid xml string.
Reputation Points: 116
Solved Threads: 243
Veteran Poster
hielo is offline Offline
1,123 posts
since Dec 2007

This thread is more than three months old

No one has posted to this discussion for at least three months. Please let old threads die and do not reply to them unless you feel you have something new and valuable to contribute that absolutely must be added to make the discussion complete. Otherwise, please start a new thread in this forum instead.
Message:
Previous Thread in ASP Forum Timeline: How to send mail from the localhost using Gmail account?
Next Thread in ASP Forum Timeline: ASP and Extensible Provisioning Protocol (EPP)





About Us | Contact Us | Advertise | Acceptable Use Policy
Forum Index | Build Custom RSS Feed


Follow us on Twitter


© 2011 DaniWeb® LLC