Title: XML and Microsoft 'NET Saqib Rasool XML Framework Product Lead PSS WebData Team Microsoft Corporatio
1XML and Microsoft .NETSaqib RasoolXML
Framework Product LeadPSS WebData TeamMicrosoft
Corporation
2XML and .NET Discussion Outline
- Introduction to XML
- Mark up languages
- XML evolution and explanation
- XML in Microsoft .NET
- Current products
- .NET overview
- XML Parser in .NET
- Summary and QA
3Mark-up Languages
- Mark up is
- Adding meaning to text
- Changing format of text
- Example
- Saqib
- ltPresentergt Saqiblt/Presentergt
- ltBoldgtSaqiblt/Boldgt
4XML Born
- XML is a mark up that describes structure
- Acts as an integration protocol between
applications - Industry standard developed by W3C
- Microsofts goal is 100 percent adherence to XML
standard
5XML Structure
- Two basic building blocks
- Elements
- Attributes
- Some others
- Declaration
- Root element
- Namespaces
lt?xml version"1.0" encoding"UTF-8" ?gt
ltBookStoregt ltBook category"reference"gt ltauthor
gtWilliam Pardi lt/authorgt lttitlegtXML in
Actionlt/titlegt ltpricegt24.95lt/pricegt lt/Bookgt
lt/BookStoregt
6Microsofts Current Support of XML
- MSXML Parser lives up to key industry standards
- Based on COM
- New .NET XML Managed Parser is modeled after
MSXML Parser
7.NET and Web Services
Web Service
Web Service
XML
XML
XML
XML
Web Service
Web Service
Client
XML
HTML
Client
XML
8The .NET Framework
VB
C
C
Visual Studio .NET
JScript
Common Language Specification
ASP .NET Web Services and Web Forms
WindowsForms
ADO .NET Data and XML
Base Class Library
Common Language Runtime
9.NET XML Classes System.Xml Parser
- Non-cached parsing
- Cached (DOM) parsing
System.Xml namespace
XmlDocument
XmlTextReader
XmlTextWriter
XmlElement
XmlNavigator
XmlAttribute
and so on
10System.Xml Code Example Non-cached Forward Only
Parsing
Using System.Xml XmlReader reader reader new
XmlTextReader("MyFile.xml") while(reader.Read())
process nodes
11System.Xml Code Example In-memory DOM-style
Parsing
using System.Xml XmlDocument xmlDoc new
XmlDocument() xmlDoc.Load("myfile.xml") XmlNode
rootNode xmlDoc.DocumentElement XmlNodeList
oNodeList rootNode.ChildNodes for (int
i0iltoNodeList.Counti) ...process
nodes...
12XML and ADO .NET Unified Architecture
13Summary
- XML Industry standard interoperability
mechanism between applications - .NET Microsoft vision of the future of
distributed applications - XML is a glue that holds all .NET components
together
14(No Transcript)