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?