XML in the 'NET Framework: Past, Present - PowerPoint PPT Presentation

1 / 19
About This Presentation
Title:

XML in the 'NET Framework: Past, Present

Description:

Standards compliance. Extensibility. Integration with ADO.NET ... XML 1.0 Compliance checking. Namespace and Validation support ... – PowerPoint PPT presentation

Number of Views:34
Avg rating:3.0/5.0
Slides: 20
Provided by: gca
Category:

less

Transcript and Presenter's Notes

Title: XML in the 'NET Framework: Past, Present


1
XML in the .NET Framework Past, Present Future
  • Dare Obasanjo
  • Program Manager
  • Microsoft Corporation
  • dareo_at_microsoft.com

2
XML in VS
  • VS 2001 and VS 2003
  • System.XML in .Net Frameworks
  • Rudimentary XML Editing Tools
  • VS 2005
  • New Features in System.XML
  • XML Editor and the XSLT Debugger

3
XML in Visual Studio 2005
  • System.Xml v1.0 Design Goals
  • Standards compliance
  • Extensibility
  • Integration with ADO.NET
  • Additional System.Xml v2.0 Design Goals
  • Usability
  • Performance
  • Enhanced Security
  • XML Tools in Visual Studio

4
System.Xml V1.0
5
XML I/O Scenarios Streaming XML
  • Reading XML from file, http, or other source
  • Fast, Forward-only pull model parser
  • Factory methods for creating instances (v2.0)
  • Pipelining and layering functionality such as
    schema validation (v2.0)
  • Preventing Denial of Service attacks (DoS) and
    unauthorized resource access (v2.0)
  • Writing XML
  • Fast, forward-only push model XML writer
  • Wellformedness checking when writing (v2.0)
  • Both Support Typed Untyped XML CLR types from
    XML
  • Use the XmlTextReader and XmlTextWriter in
    combination
  • Simple transformations

6
Filtering and Traversing When Reading
  • Limiting Access to Part of a Document
  • XmlReader ReadSubTree()
  • Returns a new XmlReader, which reads the current
    node and all of its descendant.
  • XPath Axis Methods
  • bool ReadToFollowing (string name)
  • bool ReadToDescendant (string name)
  • bool ReadToNextSibling (string name)
  • Provides an easy way to find a named element by
    moving the XmlReader to the next following,
    descendent or sibling element that matches the
    specified name.

7
XML I/O Scenarios In-Memory XML
  • XmlDocument
  • Tree model API
  • Supports DOM Level 1 and DOM Level 2
  • Exposes subset of PSVI (v2.0)
  • Validation of subtrees after edits (v2.0)
  • XPathNavigator
  • Cursor model API
  • API integrates with XmlReader XmlWriter (v2.0)
  • Exposes subset of PSVI (v2.0)
  • Validation of subtrees after edits (v2.0)

8
Parsing XML
demo
9
XmlSchemaSet and Inference
  • New XmlSchemaSet class
  • stores schemas and correctly handles multiple
    references to inherited schemas
  • replaces XmlSchemaCollection
  • System.Xml.Schema.Inference class
  • Can infer schema from an XML document
  • InferenceOption enumeration defines how data
    types and schema occurrences found in the
    document are interpreted
  • values are Relaxed or Restricted

10
Improved Performance in V2.0
  • XSLT 400 faster (4x) generates MSIL code
  • XmlReader 100 faster (2x)
  • XmlWriter 100 faster (2x)
  • XML schema validation 20 faster

11
XSLT
  • .NET V1.0 has interpretered XSLT
  • The XslTransform class
  • .NET V2.0 introduces compiled XSLT
  • The XsltTransform class
  • XSLT Stylesheets are compiled to CLR MSIL
  • (MS intermediate language)
  • Generates debugging information
  • XSLT Scenario
  • Compile once execute many times

12
System.Xml V1.0
13
System.Xml V2.0
XmlSchemaSet
14
XML Tools In Visual Studio 2005XML Editing and
XSLT Debugging
demo
15
XML Editor in VS 2005
  • Deep Integration with Visual Studio
  • Same code editor keys as for other editors in VS
  • Errors in the error list
  • Support for Property window
  • XML 1.0 Compliance checking
  • Namespace and Validation support
  • Context and Namespace Sensitive Intellisense
  • Design time validation checking and error
    reporting
  • Element completion
  • Infer a Schema from an Instance XML file

16
XSLT Debugger in VS 2005
  • Deep Integration with VS
  • Locals/Watch Window Support
  • Call Stack Support
  • Support XSLT 1.0
  • Start debugging from an XSLT File
  • Step in From C
  • View output when stepping

17
Summary
  • In V1.0 the XML support in .NET provides the
    ability to easily work with XML
  • In V2.0 there are many significant improvements
    to address usability, performance and XML tools
    within Visual Studio 2005

18
Community Resources
  • Me
  • email neetur_at_microsoft.com
  • VS2005 Beta Downloads and Feedback
  • Beta 1 http//lab.msdn.microsoft.com/vs2005/
  • Can also post and track bug report
  • MSDN XML Developer Center
  • http//msdn.microsoft.com/xml/
  • What's New in System.Xml for VS2005
  • Introduction XML Tools In VS2005
  • Newsgroups
  • microsoft.public.dotnet.xml for V1
  • microsoft.beta.whidbey.xml for V2

19
(No Transcript)
Write a Comment
User Comments (0)
About PowerShow.com