Why is my GetEntity function in my overloaded XmlResolver being passed the Formal Public Identifier when I load an xml file into an XmlDocument? Is this a bug or am I supposed to deal with this some how?
edit: Here's some code.
Say for example I do this:
XmlDocument myXmlDoc = new XmlDocument();
myXmlDoc.XmlResolver = new MyXmlResolver();
myXmlDoc.Load("myxmlfile.xml");
In MyXmlResolver
I have the following code:
public override object GetEntity(Uri absUri, string role, Type typeToRet)
{
if (typeToRet == null || typeToRet == typeof(Stream))
return GetStream(absUri);
else
throw new XmlException("Unsupported class type: " + typeToRet);
}
I get passed "file://path/to/xmldoc/-//W3C//DTD XHTML 1.1//EN
", in absUri
which doesn't make any sense to me. Am I just supposed to ignore it?