You are currently viewing our boards as a guest which gives you limited access to view most discussions, articles and access our other FREE features. By joining our free community you will have access to post topics, communicate privately with other members (PM), respond to polls, download files, upload your own photos and access many other special features. Registration is fast, simple and absolutely free so please, join our community today!
If you have any problems with the registration process or your account login, please contact contact us.
This might be of use for some of the developers in our midst. I've been getting more and more into XML and this new article from MSDN caught my eye. Resolving the Unknown: Building Custom XmlResolvers in the .NET Framework is by Mark Fussel to help you create your own implementations of XmlResolver. "There are three great pillars of abstraction in System.Xml in Version 1.1 of the Microsoft .NET Framework for working with XML. The XmlReader class provides an abstraction for streaming-based read, the XmlWriter class provides an abstraction for streaming-based write, and the XPathNavigator provides an abstraction for a cursor-style, read-only random access. However, there is a lesser used forth abstract class called the XmlResolver, which, if you develop XML-aware applications for long enough in .NET, will eventually come to your rescue!
The XmlResolver class is described in the MSDN documentation as, "resolves external XML resources named by a URI." However, a more complete definition would be as follows:
XmlResolvers resolve external data sources that are identified by a URI and then retrieve the data identified by that URI, thereby providing an abstraction for accessing data sources such as files on a file system.
In V1.1 of the .NET Framework there are two XmlResolver implementations. The XmlUrlResolver resolves data sources using the file:// and http:// protocols or any other protocols supported by the System.Web.WebRequest class. The XmlUrlResolver is the default XmlResolver for all classes in the System.Xml namespace and is used to resolve external XML resources such as entities, DTDs, or schemas. It is also used to process include and import elements found in Extensible StyleSheet Language (XSL) stylesheets or XML Schema Definition language (XSD) schemas. Since the XmlUrlResolver is the default XmlResolver for components such as the XmlTextReader, you do not typically have to instantiate one in order to load XML documents. "