Browse Source

Fix file not found exception when opening an xml document referencing a dtd in the Xml Tree View editor.

pull/6/merge
Matt Ward 14 years ago
parent
commit
78ab872f81
  1. 5
      src/AddIns/DisplayBindings/XmlEditor/Project/Src/XmlView.cs

5
src/AddIns/DisplayBindings/XmlEditor/Project/Src/XmlView.cs

@ -141,8 +141,9 @@ namespace ICSharpCode.XmlEditor @@ -141,8 +141,9 @@ namespace ICSharpCode.XmlEditor
{
if (editor == null) return false;
try {
XmlDocument Document = new XmlDocument();
Document.LoadXml(editor.Document.Text);
XmlDocument document = new XmlDocument();
document.XmlResolver = null;
document.LoadXml(editor.Document.Text);
return true;
} catch (XmlException ex) {
AddTask(editor.FileName, ex.Message, ex.LinePosition, ex.LineNumber, TaskType.Error);

Loading…
Cancel
Save