Share via


XML Developer Center Lanches on MSDN

I have been silent on my blog for a while mainly due to getting an article written for the XML Developer Center that launched today at https://msdn.microsoft.com/xml/. The article is an overview of the best features of the core XML classes in the System.Xml V2 release. Many people on the Webdata XML team said that they were amazed by how much had been done in the V2 release after reading this and this is only half the story. The other half is returning XML from SQL Server relational tables and the XML support inside SQL Server “Yukon”, now called SQL Server 2005 to enable those data publishing scenarios.

What I would like to hear are comments on is how these features may affect development projects that you are working on today or in the future. For example it is difficult to assess what impact XQuery is going to have on the industry. Some people look at XQuery simply as an alternative to some XSLT scenarios, whilst others see the rich function and operators support being crucial with XQuery as a better XPath language. What are your top 10 XML requests?

As with any article you have to cut some topics from the list. Here are the top four that nearly made it;

  1.  The XSD Inference API. Instance schema generation based upon real world XML documents which can then be refined through iteratively. More useful than an XML Schema designer.
  2. XPathDocument implements IXmlSerializable which means that it can be used as the return type for a web service method. No more String types in order to return XML. Now it can be a real document
  3. Many methods and properties on the XmlReader, XmlWriter and XPathNavigator abstract classes now have default implementations added making it easier to implement your custom versions over datastores. For example all the new CLR type accessors methods have default implementations meaning that you do not have to implement them yourself.
  4. XPathNodeIterator implements the IEnumerable interface. Now you can just 'foreach' over a selected set of nodes rather than having to call the MoveNext() method in a while loop (well I showed this, just did not say this explicitly!). E.g.

    XPathDocument doc = new XPathDocument(filename);
    XPathNodeIterator nodes= doc.Select("//Customers");
foreach (XPathNavigator node in nodes)

    {

    //...do work here

        Console.WriteLine(node.Name);
}