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 / September 2004

Tip: Looking for answers? Try searching our database.

IXMLDOMDocument.Save() does not work

Thread view: 
Enable EMail Alerts  Start New Thread
Thread rating: 
Brian - 01 Sep 2004 21:42 GMT
I am trying to load an exisiting xml file and append a
node to it then save the xml file but the save method
fails.  Here is the code:

IXMLDOMNode n;
n = thisXDocument.DOM.selectSingleNode
        ("my:root/wns:section");

object loadFilePath = "d:\\xml\\.xml";
IXMLDOMDocument newDOM = thisXDocument.CreateDOM();
newDOM.load(loadFilePath);

IXMLDOMNode no = newDOM.selectSingleNode
       ("base/Section");
               
no.appendChild(n);
newDOM.save(loadFilePath);

The error is:
System.UnauthorizedAccessException
Access is denied.

I granted full control to Everyone to the folder and the
file but I am still getting this error.  Am I missing
something simple?
Josh Bertsch [MSFT] - 02 Sep 2004 08:58 GMT
Search for the "Save As" thread that was posted earlier in this newsgroup.
That should give you some answers.

--josh bertsch

> I am trying to load an exisiting xml file and append a
> node to it then save the xml file but the save method
[quoted text clipped - 21 lines]
> file but I am still getting this error.  Am I missing
> something simple?
 
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.