dat 379 xml today and tomorrow mark fussell lead program manager microsoft corporation

25
DAT 379 XML Today And Tomorrow Mark Fussell Mark Fussell Lead Program Manager Lead Program Manager Microsoft Corporation Microsoft Corporation

Upload: blanche-marshall

Post on 01-Jan-2016

214 views

Category:

Documents


0 download

TRANSCRIPT

DAT 379 XML Today And TomorrowDAT 379 XML Today And Tomorrow

Mark FussellMark FussellLead Program ManagerLead Program ManagerMicrosoft CorporationMicrosoft Corporation

The Zen of XML The Zen of XMLXML Origami XML Origami

A understanding of XML is inescapableA understanding of XML is inescapable

XML Programming In .NETXML Programming In .NET

Today V1.1 ThemesToday V1.1 ThemesStandards compliance Standards compliance

Usability Usability

Extensibility Extensibility

Integration with ADO.NET Integration with ADO.NET

Tomorrow V2.0 ThemesTomorrow V2.0 ThemesPerformancePerformance

UsabilityUsability

Querying over XML documents and SQL Querying over XML documents and SQL Server with ADO.NETServer with ADO.NET

XML Tools in Visual StudioXML Tools in Visual Studio

XML I/O Scenarios TodayStreaming XMLXML I/O Scenarios TodayStreaming XML

Reading XML from file, http, or other sourceReading XML from file, http, or other sourceUse the XmlTextReader for parsing XMLUse the XmlTextReader for parsing XML

Fast, Forward-only cursorFast, Forward-only cursor

XmlValidatingReader – Schema ValidatingXmlValidatingReader – Schema Validating

Writing XML Writing XML Use the XmlTextWriter for writing XMLUse the XmlTextWriter for writing XML

Fast, forward-only streaming writerFast, forward-only streaming writer

Use the XmlTextReader and XmlTextWriter in Use the XmlTextReader and XmlTextWriter in combinationcombination

Simple transformationsSimple transformations

XML I/O Scenarios TomorrowXML I/O Scenarios Tomorrow

Reading XML from file, http or other sourceReading XML from file, http or other sourceUsability – Typed and untyped XML. CLR types from Usability – Typed and untyped XML. CLR types from XMLXMLUsability – Static Create methodsUsability – Static Create methodsPipelining and layering functionalityPipelining and layering functionalitySecurity – DoS and resource access authorizationSecurity – DoS and resource access authorization

Writing XMLWriting XMLTyped and untyped XML – From CLR types to XMLTyped and untyped XML – From CLR types to XMLWellformedness checking when writing to fileWellformedness checking when writing to file

Easier implementation of custom XmlReaders Easier implementation of custom XmlReaders and XmlWritersand XmlWriters

More methods and properties have default More methods and properties have default implementatons on XmlReader classimplementatons on XmlReader class

Usability CLR Type AccessorsUsability CLR Type Accessors

On XmlReader, XmlWriter and XPathNavigatorOn XmlReader, XmlWriter and XPathNavigator

Double price = Double price = XmlConvert.ToDouble(reader.ReadElementString()); XmlConvert.ToDouble(reader.ReadElementString());

//Replaced by//Replaced by

Double price = reader.ReadValueAsDouble; Double price = reader.ReadValueAsDouble;

On the XmlWriterOn the XmlWriter

DateTime publicationdate = new DateTime(2004,5,24);DateTime publicationdate = new DateTime(2004,5,24);

writer.WriteStartAttribute("publicationdate"); writer.WriteStartAttribute("publicationdate");

writer.WriteValue(publicationdate);writer.WriteValue(publicationdate);

writer.WriteEndAttribute(); writer.WriteEndAttribute();

Usability Static Create MethodsUsability Static Create Methods

Prevent a proliferation of XmlReader and XmlWriter Prevent a proliferation of XmlReader and XmlWriter implementationsimplementations

XmlReaderSettings and XmlWriterSettings classesXmlReaderSettings and XmlWriterSettings classes

Optimizations depending on the settingsOptimizations depending on the settings

PipeliningPipelining

XmlReaderSettings settings = new XmlReaderSettings(); XmlReaderSettings settings = new XmlReaderSettings(); settings.Schemas.Add(“books.xsd");settings.Schemas.Add(“books.xsd");

settings.XsdValidate = true;settings.XsdValidate = true;

XmlReader reader = XmlReader.Create(“books.xml”, XmlReader reader = XmlReader.Create(“books.xml”, settings );settings );

while(!reader.Read()) { } while(!reader.Read()) { }

XmlReader and XmlWriterXmlReader and XmlWriter

Document Scenarios TodayXML StoresDocument Scenarios TodayXML Stores

Creating and editing documentsCreating and editing documentsUse the XmlDocument class (XML DOM)Use the XmlDocument class (XML DOM)

Querying and transforming XMLQuerying and transforming XMLXSLTXSLT

Path 1.0Path 1.0

Applying business logicApplying business logicEvents to determine what has changedEvents to determine what has changed

XML over a webserviceXML over a webserviceUse the XmlNode classUse the XmlNode class

Document Scenarios TomorrowDocument Scenarios TomorrowCreating and editing documentsCreating and editing documents

Consistent editing API with XmlWriterConsistent editing API with XmlWriter

Typed XML store with Validation supportTyped XML store with Validation support

Richer querying and transformationRicher querying and transformationXSLT and XQuery XSLT and XQuery

Applying business logicApplying business logic

XML documents over a Web serviceXML documents over a Web service

Moving XML between components more Moving XML between components more easilyeasily

XPathDocument A Better XML DOMXPathDocument A Better XML DOM

The XPathDocument replaces the The XPathDocument replaces the XmlDocument as the primary XML storeXmlDocument as the primary XML store

Feature SetFeature Set20%-40% more performant for XSLT and XQuery20%-40% more performant for XSLT and XQuery

Editing capabilities through the Editing capabilities through the XPathEditableNavigator using an XmlWriterXPathEditableNavigator using an XmlWriter

XML schema validationXML schema validation

Strongly typed store with schema; e.g., Integers Strongly typed store with schema; e.g., Integers stored as CLR int typestored as CLR int type

Events fired for insert, update, and deleteEvents fired for insert, update, and delete

Change tracking supportChange tracking support

Working with the Working with the XPathDocument versus XPathDocument versus the XmlDocumentthe XmlDocument

System.Xml Today (V1.1)System.Xml Today (V1.1)

XslTransformXslTransform

XmlReaderXmlReader XmlWriterXmlWriterXmlDocumentXmlDocumentXPathDocumentXPathDocument

XPathNavigatorXPathNavigator

XmlSchemaCollectionXmlSchemaCollection

XPathEditableNavigatorXPathEditableNavigator

XsltCommandXsltCommand

XQueryCommandXQueryCommand

XmlWriterXmlWriter

XmlWriterSettingsXmlWriterSettings

XPathNavigatorXPathNavigator

XPathDocumentXPathDocumentXmlDocumentXmlDocument

XmlSchemaSetXmlSchemaSet

XmlReaderXmlReader

XmlReaderSettingsXmlReaderSettings

XmlSchemaSetXmlSchemaSet

System.Xml Tomorrow (V2)System.Xml Tomorrow (V2)

Querying Scenarios TodayQuerying Scenarios Today

QueryingQueryingXPath 1.0 to select nodes within an XPath 1.0 to select nodes within an XML documentXML document

Use XPathNavigator and Select() methodsUse XPathNavigator and Select() methods

Transforming XMLTransforming XMLXML schema to XML schemaXML schema to XML schema

HTML document generationHTML document generation

Use XsltTransform classUse XsltTransform class

Querying Scenarios TomorrowQuerying Scenarios TomorrowQueryingQuerying

XQuery is to XML as SQL is to relational databasesXQuery is to XML as SQL is to relational databases

XQuery includes XPath 1.0 and 2.0 and more…XQuery includes XPath 1.0 and 2.0 and more…Has a friendlier syntaxHas a friendlier syntax

Strongly-typed Strongly-typed

Construction of XMLConstruction of XML

Ability to do joins across documentsAbility to do joins across documents

Comprehensive set of functions and operatorsComprehensive set of functions and operators

Use XQueryCommand classUse XQueryCommand class

Transforming XMLTransforming XMLCompiled XSLT with the XsltCommand classCompiled XSLT with the XsltCommand class

Generates MSILGenerates MSIL

Debugging XSLTDebugging XSLT

XQuery: The EssentialsXQuery: The Essentials

As simple as XPath…As simple as XPath…Get all the customers from the context documentGet all the customers from the context document

/customers/customers

FLWOR — FOR/LET/WHERE/ORDER BY/RETURN FLWOR — FOR/LET/WHERE/ORDER BY/RETURN

Yet much more powerful… Yet much more powerful… Get all the customers and for each customer list their order Get all the customers and for each customer list their order amounts joining across two documentsamounts joining across two documents

for $cust in doc (‘customers’)//customer for $cust in doc (‘customers’)//customer returnreturn<customer><customer>{{

for $order in doc (‘orders’)//orderfor $order in doc (‘orders’)//order where ($cust/id = $order/custid)where ($cust/id = $order/custid)

return <order> { $order/@amount} </order>return <order> { $order/@amount} </order>}}</customer></customer>

Querying XML With XQueryQuerying XML With XQuery

Performance ImprovementsPerformance ImprovementsXML parsing and XSLT performanceXML parsing and XSLT performance

XML schema validation 20% fasterXML schema validation 20% faster

XmlTextReader 100% faster (2x)XmlTextReader 100% faster (2x)

XmlTextWriter 100% faster (2x)XmlTextWriter 100% faster (2x)

XSLT 4x fasterXSLT 4x faster

0 1 2 3 4 5

.NET v2

.NET v1.1XSLT

XmlTextWriter

XmlTextReader

XML Schema Validation

XML Tools In XML Tools In Visual Studio 2005Visual Studio 2005XML Editing, XML Schema XML Editing, XML Schema generation, and XSLT Debugginggeneration, and XSLT Debugging

SummarySummary

Today the XML support in .NET Today the XML support in .NET provides the ability to easily work with provides the ability to easily work with any XML that you encounter any XML that you encounter

Tomorrow there are many Tomorrow there are many improvements to address usability, improvements to address usability, querying, performance and XML tools querying, performance and XML tools within Visual Studio 2005within Visual Studio 2005

Find me in the Community LoungeFind me in the Community [email protected]@microsoft.com

MSDN XML Developer CenterMSDN XML Developer Centerhttp://msdn.microsoft.com/xml/http://msdn.microsoft.com/xml/

What's New in What's New in System.XmlSystem.Xml for Visual Studio 2005 and the .NET Framework 2.0 for Visual Studio 2005 and the .NET Framework 2.0 Release Release

NewsgroupsNewsgroupsmicrosoft.public.dotnet.xml for V1microsoft.public.dotnet.xml for V1

microsoft.beta.whidbey.xml for V2microsoft.beta.whidbey.xml for V2

Related SessionsRelated SessionsThursdayThursday

DATPNL  Data Access Round Table.DATPNL  Data Access Round Table. 11:45 11:45 AM- 12:30 PM, Room 8AM- 12:30 PM, Room 8

DAT319  XML in the Database - the XML DAT319  XML in the Database - the XML Data Type in SQL Server 2005 (code named Data Type in SQL Server 2005 (code named "Yukon")."Yukon"). 1:30 PM- 2:45 PM, Room 5AB 1:30 PM- 2:45 PM, Room 5AB

DAT376  What's New in ADO.NET for Visual DAT376  What's New in ADO.NET for Visual Studio 2005 (code named "Whidbey").Studio 2005 (code named "Whidbey"). 5:30 5:30 PM- 6:45 PM, Room 5ABPM- 6:45 PM, Room 5AB

FridayFriday

DAT327  SQL Server 2005 (code named DAT327  SQL Server 2005 (code named "Yukon"): Inside XQuery"Yukon"): Inside XQuery. 2:45 PM- 4:00 PM, . 2:45 PM- 4:00 PM, Room 9Room 9

Bix
You need an additional resources slide. It should contain other sessions that make your attendees should look into.

Q1:Q1: Overall satisfaction with the sessionOverall satisfaction with the session

Q2:Q2: Usefulness of the informationUsefulness of the information

Q3:Q3: Presenter’s knowledge of the subjectPresenter’s knowledge of the subject

Q4:Q4: Presenter’s presentation skillsPresenter’s presentation skills

Q5:Q5: Effectiveness of the presentationEffectiveness of the presentation

Please fill out a session evaluation on CommNetPlease fill out a session evaluation on CommNet

© 2004 Microsoft Corporation. All rights reserved.This presentation is for informational purposes only. Microsoft makes no warranties, express or implied, in this summary.