c# - Why does XmlDocument.Load(String) seem to want read-write access? -


according msdn .net xmldocument.load(string) method requires write access underlying file. exceptions list says

unauthorizedaccessexception :  filename specified file read-only.... 

my question boils down to

  • is true read-write access needed, or documentation error?
  • does mean file kept open during lifetime of object?
  • does mean modifications the xmldocument , sub-nodes can result in live modifications file on disk? without explicit save.

is true read-write access needed

  • looks documentation bug. when loading, xmldocument creates xmlreader, which, afaik, doesn't throws such exceptions.

does mean file kept open during lifetime of object

  • no, file becomes closed after reading.

does mean modifications the xmldocument , sub-nodes can result in live modifications file on disk

  • no, because file closed.

Comments

Popular posts from this blog

jquery - How can I dynamically add a browser tab? -

node.js - Getting the socket id,user id pair of a logged in user(s) -

keyboard - C++ GetAsyncKeyState alternative -