1 / 33

MSXML in 2000

MSXML In-Depth Features: Current And Future Charlie Heinemann Program Manager XML Core Services Microsoft Corporation 9-326. MSXML in 2000. What’s available today? What’s available tomorrow? What’s on the horizon?. MSXML in Windows 2000. MSXML2 in SQL Server 2000. MSXML3 on the Web.

nadine
Download Presentation

MSXML in 2000

An Image/Link below is provided (as is) to download presentation Download Policy: Content on the Website is provided to you AS IS for your information and personal use and may not be sold / licensed / shared on other websites without getting consent from its author. Content is provided to you AS IS for your information and personal use only. Download presentation by click this link. While downloading, if for some reason you are not able to download a presentation, the publisher may have deleted the file from their server. During download, if you can't get a presentation, the file might be deleted by the publisher.

E N D

Presentation Transcript


  1. MSXML In-Depth Features: Current And FutureCharlie HeinemannProgram ManagerXML Core ServicesMicrosoft Corporation 9-326

  2. MSXML in 2000 • What’s available today? • What’s available tomorrow? • What’s on the horizon? MSXML in Windows 2000 MSXML2 in SQL Server 2000 MSXML3 on the Web

  3. MSXML in Windows 2000 • XML 1.0 • Namespace 1.0 • DOM 1.0 (Document Object Model) • Schema (Validation) • XSL (Transformations) • XSL Pattern (Querying) • XMLHTTP (Posting and Getting XML) • XML Data Source Object • IE 5 XML Support

  4. MSXML in Production • Microsoft.com • Document Management • Document Interchange • 200,000 – 2 million hits/day

  5. MSXML2: Performance • Advanced XML Interfaces • In-line Schemas • General Performance Enhancements • Improved Scalability

  6. Advanced XML API’s • XSL Interfaces • XSLTemplate Interface • XSLProcessor Interface • DOMSelection Interface • SchemaCollection Interface

  7. XSL Interfaces • Passing parameters to stylesheets • Passing objects to stylesheets • Caching stylesheets

  8. Demo Part 1 • XSLT Transform • Passing Parameters • Passing Objects

  9. XSL Interfaces: Passing Parameters xslprocessor.addParameter(“color”, “red”) . . . <xsl:param name=“color”/> <xsl:template name=“BodyTemplate”> <tr style="color:{$color}"> … </tr> </xsl:template>

  10. XSL Interfaces: Passing Objects myObj.numberValue = .15 xslproc.addObject(myObj, "urn:my-percent-object") … <xsl:stylesheet xmlns:perObj=“urn:my-percent-object” …> <xsl:template match="price"> <xsl:value-of select="."/> @ <xsl:value-of select="perObj:get-percent()"/> discount </xsl:template>

  11. DOMSelection Interface • Querying the DOM using Xpath xmldoc.setProperty(“SelectionLanguage”, “XPath”) domsel = xmldoc.selectNodes(“//child::*”) • Returns an DOMSelection Object • Inherits from IXMLDOMNodeList • Added functionality for managing result sets returned from a query • Caching queries • Compile the XPath expression once • Programmatically set multiple contexts

  12. SchemaCollection Interface • Caching schemas to improve performance • Validating XML against external schemas • Validating XML at run-time

  13. Demo Part 2 • In-line Schema Support • Validating against external schemas • Re-applying the schema cache

  14. In-Line Schema Support <root xmlns:foo=“x-schema:#mySchema”> <Schema name=“mySchema” xmlns=“urn:schemas-microsoft-com:xml-data”> <ElementType name=“bar”/> </Schema> <foo:bar>Hello World</foo:bar> </root>

  15. SchemaCollection Interface: Creating a Schema Cache cache = new ActiveXObject(“MSXML2.XMLSchemaCache"); cache.add("myFooURI", "http://server/xmldataschema1.xml"); cache.add("uri3", myDomDocument); xmldoc.schemas = cache; xmdoc.load("http://myserver/mydata.xml");

  16. SchemaCollection Interface: Applying the Schema Cache cache.add(“urn:book-ns”, schemaDoc) xmldoc.schemas = cache xmldoc.load(“xmlfile.xml”) newNode = xmldoc.createElement(“pub”) docEl = xmldoc.documentElement docEl.appendChild(newNode) xmldoc.validate()

  17. General Performance Enhancements • XSLT Transformations • Up to 3x Improvement over MSXML • Querying the DOM • Walking the DOM • Plug in MSXML2 and improve performance of old scenarios

  18. Improved Scalability • 100% increase in scaling • Greatest increase in 4+ procs • See http://msdn.microsoft.com/xml/articles/xml03202000.asp for numbers and scenarios

  19. MSXML3: Standards • Full XSLT Support • Full XPath Support • SAX (Simple API for XML) • Finishing touches on XML 1.0

  20. XSLT/XPath Support • XSLT • Full compliance • Script Blocks • XPath • Full compliance • SelectNodes Support

  21. Demo Part 3 • XPath Querying • XPath support in the DOM - selectNodes

  22. SAX2 • Low-level Parser Interfaces • Event-driven parser • Parsing w/o building a DOM tree • Needed for messaging and other high-throughput scenarios • Needed for processing large documents • Currently available for C++ programmers - VB interfaces coming soon

  23. Demo Part 4 • SAXXMLReader • SAX in VB

  24. Event-driven Parser Private Sub ISAXContentHandler_StartElement( NamespaceURI, LocalName, RawName, Attributes) If LocalName = “Book” Then Debug.Print "Book Data Present" End If End Sub

  25. Full XML 1.0 Compliance • Put the finishing touches on 1.0 compliance • Full Namespace 1.0 compliance

  26. Advanced XMLDSO Support • Better integration with ADO • Binding Flat XML to Controls using ADO 2.5 • Binding Complex XML to Hierarchical Controls using ADO 2.6

  27. Demo Part 5 • XML Data Source Object • Displaying XML in Excel

  28. Binding XML to Grid Controls CN.Provider = “MSDAOSP” CN.Properties(“DataSource”) = “MSXML2.DSOControl” CN.Open RS.Open “http://server/simple.xml”, CN Set DataGrid1.DataSource = RS

  29. Conclusion MSXML in Production Now MSXML2 – new Performance-enhancing XML API’s, additional schema work, general performance improvements MSXML3 – Standards Release: Full XSLT and XPath support, SAX2, Full XML 1.0 Compliance XML

  30. Resources and Services • XML Developer Center http://msdn.microsoft.com/xml • SOAP Toolkit http://msdn.microsoft.com/xml/general/ toolkit_intro.asp • SQL Server 2000 Beta http://www.microsoft.com/SQL/productinfo/ sql2kord.htm • Biztalk Server 2000 Technical Preview http://www.microsoft.com/biztalkserver/ techres/techpreview.asp

  31. Call to Action • Download the latest MSXML release (MSXML3) • Visit the XML Developer Center and check out the new materials there • Start prototyping and developing applications using XML technologies

More Related