Home. 
.

transparent

transparent

transparent

Altova Mailing List Archives


Re: XMLDOM.save NOT saving?

From: "Joe Fawcett" <joefawcett@-------.--->
To: NULL
Date: 1/5/2005 1:26:00 PM
"jmyers" <jmyers@d...> wrote in message
news:9EB164A3-E472-4E8A-9314-18CB45B4C518@m......
> Actually, I had it working on the client side using the code and then
> displaying the results in the web browser.   That tells me it finds the
file.
>  Also, I editing some values in the XML file and the changes diplayed
> correctly.
>
> I only included the code here that represeneted the last step which was to
> make the code serverside and save the doc.

You still need to Server.MapPath the file location
>
> Any advantage in using...
>
> set xmldoc = Server.CreateObject("Msxml2.DOMDocument.3.0")
>
Yes, even better to iinstall version 4 and use:
Server.CreateObject("Msxml2.DOMDocument.4.0")
The newer parsers are faster and more reliable and with version 4 you don't
need to specify to use XPath if you are selecting nodes.

Joe (MVP-XML)


> j
>
>
> "Han" wrote:
>
> > Your xml might be not loaded. For debugging, replace
> >
> > > xmlDoc.load("test.xml")
> >
> > with
> >
> > > xmlDoc.loadXml("<a/>")
> >
> > Optionally, you may want server.mapPath() for the xml file path.
> >
> > Additionally, saving xml file in the server is bad idea. Use databases
> > instead.
> >
> > -- 
> > Pohwan Han. Seoul. Have a nice day.
> > "Jeff" <Jeff@d...> wrote in message
> > news:36387C6E-B0E2-467B-AB60-38A65948D97B@m......
> > > ASP on the serverside will create the file when saving but the file is
0
> > > bytes.
> > > I've tried several things including perms.  Even went so far as to
make
> > > EVERYONE full access. (just for testing)
> > > Still doesn't work.
> > >
> > > Here's what I'm trying.
> > >
> > > <%
> > > set xmlDoc=Server.CreateObject("Microsoft.XMLDOM")
> > > xmlDoc.async="false"
> > > xmlDoc.load("test.xml")
> > > xmlDoc.save("c:\test.xml")
> > > %>
> > >
> > > Again, c:\test.xml is created but 0btyes.
> > >
> > > I'm a newbie so go easy eh?
> > > thanks,
> > > j
> > >
> > >
> > >
> >
> >




transparent
Print
Mail
Digg
delicious
Disclaimer
.

These Archives are provided for informational purposes only and have been generated directly from the Altova mailing list archive system and are comprised of the lists set forth on www.altova.com/list/index.html. Therefore, Altova does not warrant or guarantee the accuracy, reliability, completeness, usefulness, non-infringement of intellectual property rights, or quality of any content on the Altova Mailing List Archive(s), regardless of who originates that content. You expressly understand and agree that you bear all risks associated with using or relying on that content. Altova will not be liable or responsible in any way for any content posted including, but not limited to, any errors or omissions in content, or for any losses or damage of any kind incurred as a result of the use of or reliance on any content. This disclaimer and limitation on liability is in addition to the disclaimers and limitations contained in the Website Terms of Use and elsewhere on the site.

.
.

transparent

transparent