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
createsxmlreader
, 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
Post a Comment