B
Brian
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?
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?