Home | Contact Us | FAQ | Search & Site Map | Link to Us
Sign In | Join | Other 45 Sites in Network
Home
DiscussionsAccessExcelInfoPathOutlookPowerPointPublisherWord
DirectoryUser Groups
Related Topics
Outlook ExpressInternet ExplorerWindowsMS Server ProductsMore Topics ...

MS Office Forum / General MS InfoPath Questions / January 2006

Tip: Looking for answers? Try searching our database.

load v.s. loadXML

Thread view: 
Enable EMail Alerts  Start New Thread
Thread rating: 
Richard - 12 Jan 2006 20:44 GMT
I have a web service that returns xml content of a file.xml  as string.

I create a DOM called myDOM.
myDOM.loadXML(webreturnnode.text)  this does not work.

while
myDOM.load("file.xml") works just fine..

To see the difference, I am trying to save the string into a file first and
then do the load . see if that works, but I get errors with permission etc.

StreamWriter sw = new StreamWriter("d:\\temp\\myfile.xml");
sw.Write(webreturnnode.text);
           
Greg Collins [InfoPath MVP] - 13 Jan 2006 00:50 GMT
.load = load an XML file from the file system into an XML DOM.
.loadXML = Load a string of XML code into an XML DOM.

Signature

Greg Collins [InfoPath MVP]
Visit http://www.InfoPathDev.com

I have a web service that returns xml content of a file.xml  as string.

I create a DOM called myDOM.
myDOM.loadXML(webreturnnode.text)  this does not work.

while
myDOM.load("file.xml") works just fine..

To see the difference, I am trying to save the string into a file first and
then do the load . see if that works, but I get errors with permission etc.

StreamWriter sw = new StreamWriter("d:\\temp\\myfile.xml");
sw.Write(webreturnnode.text);
Richard - 13 Jan 2006 01:13 GMT
that is what I am doing, I am loading the text part of the node returned from
the web service., but eventhough the content of this string is the same as
the content of the file, but loadxml(string)  gives me errors while
load(file) does not.
please see my post in infopathdev :
http://infopathdev.com/forums/topic.asp?TOPIC_ID=1483

> ..load = load an XML file from the file system into an XML DOM.
> ..loadXML = Load a string of XML code into an XML DOM.
[quoted text clipped - 12 lines]
> StreamWriter sw = new StreamWriter("d:\\temp\\myfile.xml");
>  sw.Write(webreturnnode.text);
Greg Collins [InfoPath MVP] - 13 Jan 2006 13:25 GMT
Have you tried using .validateOnParse = false ?

Signature

Greg Collins [InfoPath MVP]
Visit http://www.InfoPathDev.com

that is what I am doing, I am loading the text part of the node returned from
the web service., but eventhough the content of this string is the same as
the content of the file, but loadxml(string)  gives me errors while
load(file) does not.
please see my post in infopathdev :
http://infopathdev.com/forums/topic.asp?TOPIC_ID=1483

"Greg Collins [InfoPath MVP]" wrote:

> ..load = load an XML file from the file system into an XML DOM.
> ..loadXML = Load a string of XML code into an XML DOM.
 
Sign In
Join
My Latest Posts
My Monitored Threads
My Blog
My Photo Gallery
My Profile
My Homepage

Start New Thread
Enable EMail Alerts
Rate this Thread



©2008 Advenet LLC   Privacy Policy - Terms of Use
This website includes both content owned or controlled by Advenet as well as content owned or controlled by third parties.