first_page

UriTree: Introducing Songhay.Xml.XmlUtility

Songhay.Xml.XmlUtilityThe image at right summarizes the static class Songhay.Xml.XmlUtility. UriTree depends heavily on this “helper” class. This definition instances the workhorse of all XML-related activities for Songhay System enterprise data solutions. The design goals include:

  • Exploiting the System.Xml.XPath.IXPathNavigable interface. Use of this interface almost completely eliminates the boundary between XmlDocument and XPathDocument. This reduces lines of code—especially when writing overloads that erroneously distinguish these types. In the Songhay.Xml.XmlUtility definition, you will see members with IXPathNavigable XSet among the arguments.
  • Leveraging .NET 2.0 Generics. The GetInstance<T>(String XmlPath) and GetInstanceRaw<T>(String XmlString) members are generic de-serialization methods that are designed to handle all of the de-serialization tasks required by Songhay System solutions. Their featured use case is when an XML configuration file needs to be loaded from disk and instanced into a .NET type.
  • Centralizing XPathDocument “factory” code. Songhay System makes the XPathDocument the premiere, .NET 2.0 XML data type. It follows that the XPathNavigator is the premiere XML data set. We can find no near-fatal flaws with this Microsoft innovation! The GetXpDoc(), GetXpNode() and GetXpNodes() members of Songhay.Xml.XmlUtility express this sentiment. This ‘sentiment’ might be considered ridiculous for the seasoned, .NET 1.x, XML maven. This is because such experienced folk may have overlooked the sentence, “The XPathNavigator class has been updated to include editing capabilities…” in the MSDN documentation.
  • Centralizing all required XSL transformation scenarios. The new very, very fast XslCompiledTransform is featured in these members: GetXslResult(), GetXslString(), LoadXslTransform() and WriteXslTransform().
  • Centralizing namespace management for XPath queries. The GetNamespaceManager() members handle certain XPath node ‘resolution issues’ that are beyond the scope of this document.Our UriTree takes advantage of the ‘XPathDocument factory code’ and the associated namespace routines in Songhay.Xml.XmlUtility. This is a brief introduction of the Songhay.Xml.XmlUtility. Going forward, certainly this topic will come up again as this “helper” class is fundamental to the Songhay System.

rasx()