SlideShare a Scribd company logo
1 of 7
   Document Object Model (DOM) provide standards that
    define the structure and a standard programming
    interface that can be used in a wide variety of
    environments and applications for XML documents.

   Classes that support the DOM are typically capable of
    random access navigation and modification of the XML
    document.

   The XML classes are accessible by setting a reference to
    the System.Xml.dll file. The System.Data.dll file also
    extends the System.Xml namespace.
   XmlDocument
   XmlDataDocument
   XPathDocument
   XmlConvert
   XPathNavigator
   XmlNodeReader
   XmlTextReader
   XmlTextWriter
   XmlReader
   XslTransform
   The XML Classes
   Creating a New XmlDocument from Scratch
   Parsing XmlDocuments (using DOM and
    XPathNavigator)
   Searching the XmlDocument (using DOM and
    XPathNavigator)
   Writing an XML File Using the XmlTextWriter
   Reading an XML File Using the XmlTextReader
   Modifying an XML Document
   Validating XML Documents
   Using LINQ to XML
   LINQ to XML is a LINQ-enabled, in-memory XML
    programming interface that enables you to work with XML
    from within the .NET Framework programming languages.

   LINQ to XML is like the Document Object Model (DOM) in
    that it brings the XML document into memory. You can
    query and modify the document, and after you modify it
    you can save it to a file or serialize it and send it over the
    Internet. However, LINQ to XML differs from DOM: It
    provides a new object model that is lighter weight
    and easier to work with, and that takes advantage of
    language improvements in Visual C# 2008.
   The most important advantage of LINQ to XML is its
    integration with Language-Integrated Query (LINQ). This
    integration enables you to write queries on the in-memory
    XML document to retrieve collections of elements and
    attributes. The query capability of LINQ to XML is
    comparable in functionality (although not in syntax) to
    XPath and XQuery. The integration of LINQ in Visual C#
    2008 provides stronger typing, compile-time checking, and
    improved debugger support.

   Another advantage of LINQ to XML is the ability to use
    query results as parameters to XElement and XAttribute
    object constructors enables a powerful approach to creating
    XML trees. This approach, called functional construction,
    enables developers to easily transform XML trees from one
    shape to another.
IEnumerable<XElement> partNos = from item in
purchaseOrder.Descendants("Item") where (int)
item.Element("Quantity") * (decimal)
item.Element("USPrice") > 100 orderby
(string)item.Element("PartNumber") select item;

More Related Content

What's hot

Simple Object Access Protocol
Simple Object Access ProtocolSimple Object Access Protocol
Simple Object Access Protocol
Saatviga Sudhahar
 
Introduction to Web Architecture
Introduction to Web ArchitectureIntroduction to Web Architecture
Introduction to Web Architecture
Chamnap Chhorn
 

What's hot (20)

Functions in php
Functions in phpFunctions in php
Functions in php
 
Introduction to es6
Introduction to es6Introduction to es6
Introduction to es6
 
Web Application Introduction
Web Application  IntroductionWeb Application  Introduction
Web Application Introduction
 
Sed & awk the dynamic duo
Sed & awk   the dynamic duoSed & awk   the dynamic duo
Sed & awk the dynamic duo
 
Network programming
Network programmingNetwork programming
Network programming
 
Unix operating system
Unix operating systemUnix operating system
Unix operating system
 
GUI design using JAVAFX.ppt
GUI design using JAVAFX.pptGUI design using JAVAFX.ppt
GUI design using JAVAFX.ppt
 
jQuery for beginners
jQuery for beginnersjQuery for beginners
jQuery for beginners
 
Extensible Markup Language (XML)
Extensible Markup Language (XML)Extensible Markup Language (XML)
Extensible Markup Language (XML)
 
Linux operating system - Overview
Linux operating system - OverviewLinux operating system - Overview
Linux operating system - Overview
 
Php and MySQL
Php and MySQLPhp and MySQL
Php and MySQL
 
Data sharding
Data shardingData sharding
Data sharding
 
CORBA
CORBACORBA
CORBA
 
Working with JSON
Working with JSONWorking with JSON
Working with JSON
 
Xpath presentation
Xpath presentationXpath presentation
Xpath presentation
 
Clustering for Stream and Parallelism (DATA ANALYTICS)
Clustering for Stream and Parallelism (DATA ANALYTICS)Clustering for Stream and Parallelism (DATA ANALYTICS)
Clustering for Stream and Parallelism (DATA ANALYTICS)
 
Introduction to Relational Databases
Introduction to Relational DatabasesIntroduction to Relational Databases
Introduction to Relational Databases
 
Simple Object Access Protocol
Simple Object Access ProtocolSimple Object Access Protocol
Simple Object Access Protocol
 
Web Mining & Text Mining
Web Mining & Text MiningWeb Mining & Text Mining
Web Mining & Text Mining
 
Introduction to Web Architecture
Introduction to Web ArchitectureIntroduction to Web Architecture
Introduction to Web Architecture
 

Viewers also liked

Introduction to web development
Introduction to web developmentIntroduction to web development
Introduction to web development
Mohammed Safwat
 
1-01: Introduction To Web Development
1-01: Introduction To  Web  Development1-01: Introduction To  Web  Development
1-01: Introduction To Web Development
apnwebdev
 

Viewers also liked (13)

Webinar: Front End Web Development - Trendy Web Designs Using HTML5
Webinar: Front End Web Development - Trendy Web Designs Using HTML5Webinar: Front End Web Development - Trendy Web Designs Using HTML5
Webinar: Front End Web Development - Trendy Web Designs Using HTML5
 
Scrum inception
Scrum inceptionScrum inception
Scrum inception
 
Java Script Introduction
Java Script IntroductionJava Script Introduction
Java Script Introduction
 
Introduction to web development
Introduction to web developmentIntroduction to web development
Introduction to web development
 
Web Development introduction
Web Development introductionWeb Development introduction
Web Development introduction
 
Javascript
JavascriptJavascript
Javascript
 
1-01: Introduction To Web Development
1-01: Introduction To  Web  Development1-01: Introduction To  Web  Development
1-01: Introduction To Web Development
 
Modern Front-End Development
Modern Front-End DevelopmentModern Front-End Development
Modern Front-End Development
 
The State of Front End Web Development 2011
The State of Front End Web Development 2011The State of Front End Web Development 2011
The State of Front End Web Development 2011
 
Front-end development introduction (HTML, CSS). Part 1
Front-end development introduction (HTML, CSS). Part 1Front-end development introduction (HTML, CSS). Part 1
Front-end development introduction (HTML, CSS). Part 1
 
Html 5 in a big nutshell
Html 5 in a big nutshellHtml 5 in a big nutshell
Html 5 in a big nutshell
 
Up to Speed on HTML 5 and CSS 3
Up to Speed on HTML 5 and CSS 3Up to Speed on HTML 5 and CSS 3
Up to Speed on HTML 5 and CSS 3
 
Introduction to Development for the Internet
Introduction to Development for the InternetIntroduction to Development for the Internet
Introduction to Development for the Internet
 

Similar to Working with xml data

Applied xml programming for microsoft
Applied xml programming for microsoftApplied xml programming for microsoft
Applied xml programming for microsoft
Raghu nath
 
04 sm3 xml_xp_07
04 sm3 xml_xp_0704 sm3 xml_xp_07
04 sm3 xml_xp_07
Niit Care
 
Understanding Dom
Understanding DomUnderstanding Dom
Understanding Dom
LiquidHub
 
Validating Xml
Validating XmlValidating Xml
Validating Xml
LiquidHub
 
buildingxmlbasedapplications-180322042009.pptx
buildingxmlbasedapplications-180322042009.pptxbuildingxmlbasedapplications-180322042009.pptx
buildingxmlbasedapplications-180322042009.pptx
NKannanCSE
 
04 sm3 xml_xp_08
04 sm3 xml_xp_0804 sm3 xml_xp_08
04 sm3 xml_xp_08
Niit Care
 

Similar to Working with xml data (20)

Linq to xml
Linq to xmlLinq to xml
Linq to xml
 
Applied xml programming for microsoft
Applied xml programming for microsoftApplied xml programming for microsoft
Applied xml programming for microsoft
 
Xml and xml processor
Xml and xml processorXml and xml processor
Xml and xml processor
 
Xml and xml processor
Xml and xml processorXml and xml processor
Xml and xml processor
 
XML Unit 01
XML Unit 01XML Unit 01
XML Unit 01
 
04 sm3 xml_xp_07
04 sm3 xml_xp_0704 sm3 xml_xp_07
04 sm3 xml_xp_07
 
LINQ to XML
LINQ to XMLLINQ to XML
LINQ to XML
 
epicenter2010 Open Xml
epicenter2010   Open Xmlepicenter2010   Open Xml
epicenter2010 Open Xml
 
Linq To XML Overview
Linq To XML OverviewLinq To XML Overview
Linq To XML Overview
 
The xml
The xmlThe xml
The xml
 
Understanding Dom
Understanding DomUnderstanding Dom
Understanding Dom
 
treeview
treeviewtreeview
treeview
 
treeview
treeviewtreeview
treeview
 
Fyp presentation 2 (SQL Converter)
Fyp presentation 2 (SQL Converter)Fyp presentation 2 (SQL Converter)
Fyp presentation 2 (SQL Converter)
 
Validating Xml
Validating XmlValidating Xml
Validating Xml
 
Web services Overview in depth
Web services Overview in depthWeb services Overview in depth
Web services Overview in depth
 
Building XML Based Applications
Building XML Based ApplicationsBuilding XML Based Applications
Building XML Based Applications
 
buildingxmlbasedapplications-180322042009.pptx
buildingxmlbasedapplications-180322042009.pptxbuildingxmlbasedapplications-180322042009.pptx
buildingxmlbasedapplications-180322042009.pptx
 
XML Introduction
XML IntroductionXML Introduction
XML Introduction
 
04 sm3 xml_xp_08
04 sm3 xml_xp_0804 sm3 xml_xp_08
04 sm3 xml_xp_08
 

More from aspnet123

Deploying configuring caching
Deploying configuring cachingDeploying configuring caching
Deploying configuring caching
aspnet123
 
Mobile application
Mobile applicationMobile application
Mobile application
aspnet123
 
Globalization and accessibility
Globalization and accessibilityGlobalization and accessibility
Globalization and accessibility
aspnet123
 
Monitoring, troubleshooting,
Monitoring, troubleshooting,Monitoring, troubleshooting,
Monitoring, troubleshooting,
aspnet123
 
Programming web application
Programming web applicationProgramming web application
Programming web application
aspnet123
 
User controls
User controlsUser controls
User controls
aspnet123
 
Custom controls
Custom controlsCustom controls
Custom controls
aspnet123
 
Web services
Web servicesWeb services
Web services
aspnet123
 
Connected data classes
Connected data classesConnected data classes
Connected data classes
aspnet123
 
Disconnected data
Disconnected dataDisconnected data
Disconnected data
aspnet123
 
Introducing asp
Introducing aspIntroducing asp
Introducing asp
aspnet123
 

More from aspnet123 (12)

Deploying configuring caching
Deploying configuring cachingDeploying configuring caching
Deploying configuring caching
 
Mobile application
Mobile applicationMobile application
Mobile application
 
Profile
ProfileProfile
Profile
 
Globalization and accessibility
Globalization and accessibilityGlobalization and accessibility
Globalization and accessibility
 
Monitoring, troubleshooting,
Monitoring, troubleshooting,Monitoring, troubleshooting,
Monitoring, troubleshooting,
 
Programming web application
Programming web applicationProgramming web application
Programming web application
 
User controls
User controlsUser controls
User controls
 
Custom controls
Custom controlsCustom controls
Custom controls
 
Web services
Web servicesWeb services
Web services
 
Connected data classes
Connected data classesConnected data classes
Connected data classes
 
Disconnected data
Disconnected dataDisconnected data
Disconnected data
 
Introducing asp
Introducing aspIntroducing asp
Introducing asp
 

Recently uploaded

Harnessing Passkeys in the Battle Against AI-Powered Cyber Threats.pptx
Harnessing Passkeys in the Battle Against AI-Powered Cyber Threats.pptxHarnessing Passkeys in the Battle Against AI-Powered Cyber Threats.pptx
Harnessing Passkeys in the Battle Against AI-Powered Cyber Threats.pptx
FIDO Alliance
 
“Iamnobody89757” Understanding the Mysterious of Digital Identity.pdf
“Iamnobody89757” Understanding the Mysterious of Digital Identity.pdf“Iamnobody89757” Understanding the Mysterious of Digital Identity.pdf
“Iamnobody89757” Understanding the Mysterious of Digital Identity.pdf
Muhammad Subhan
 

Recently uploaded (20)

Vector Search @ sw2con for slideshare.pptx
Vector Search @ sw2con for slideshare.pptxVector Search @ sw2con for slideshare.pptx
Vector Search @ sw2con for slideshare.pptx
 
Collecting & Temporal Analysis of Behavioral Web Data - Tales From The Inside
Collecting & Temporal Analysis of Behavioral Web Data - Tales From The InsideCollecting & Temporal Analysis of Behavioral Web Data - Tales From The Inside
Collecting & Temporal Analysis of Behavioral Web Data - Tales From The Inside
 
Working together SRE & Platform Engineering
Working together SRE & Platform EngineeringWorking together SRE & Platform Engineering
Working together SRE & Platform Engineering
 
Continuing Bonds Through AI: A Hermeneutic Reflection on Thanabots
Continuing Bonds Through AI: A Hermeneutic Reflection on ThanabotsContinuing Bonds Through AI: A Hermeneutic Reflection on Thanabots
Continuing Bonds Through AI: A Hermeneutic Reflection on Thanabots
 
The Value of Certifying Products for FDO _ Paul at FIDO Alliance.pdf
The Value of Certifying Products for FDO _ Paul at FIDO Alliance.pdfThe Value of Certifying Products for FDO _ Paul at FIDO Alliance.pdf
The Value of Certifying Products for FDO _ Paul at FIDO Alliance.pdf
 
Event-Driven Architecture Masterclass: Engineering a Robust, High-performance...
Event-Driven Architecture Masterclass: Engineering a Robust, High-performance...Event-Driven Architecture Masterclass: Engineering a Robust, High-performance...
Event-Driven Architecture Masterclass: Engineering a Robust, High-performance...
 
Linux Foundation Edge _ Overview of FDO Software Components _ Randy at Intel.pdf
Linux Foundation Edge _ Overview of FDO Software Components _ Randy at Intel.pdfLinux Foundation Edge _ Overview of FDO Software Components _ Randy at Intel.pdf
Linux Foundation Edge _ Overview of FDO Software Components _ Randy at Intel.pdf
 
Event-Driven Architecture Masterclass: Challenges in Stream Processing
Event-Driven Architecture Masterclass: Challenges in Stream ProcessingEvent-Driven Architecture Masterclass: Challenges in Stream Processing
Event-Driven Architecture Masterclass: Challenges in Stream Processing
 
Google I/O Extended 2024 Warsaw
Google I/O Extended 2024 WarsawGoogle I/O Extended 2024 Warsaw
Google I/O Extended 2024 Warsaw
 
Introduction to FDO and How It works Applications _ Richard at FIDO Alliance.pdf
Introduction to FDO and How It works Applications _ Richard at FIDO Alliance.pdfIntroduction to FDO and How It works Applications _ Richard at FIDO Alliance.pdf
Introduction to FDO and How It works Applications _ Richard at FIDO Alliance.pdf
 
UiPath manufacturing technology benefits and AI overview
UiPath manufacturing technology benefits and AI overviewUiPath manufacturing technology benefits and AI overview
UiPath manufacturing technology benefits and AI overview
 
Harnessing Passkeys in the Battle Against AI-Powered Cyber Threats.pptx
Harnessing Passkeys in the Battle Against AI-Powered Cyber Threats.pptxHarnessing Passkeys in the Battle Against AI-Powered Cyber Threats.pptx
Harnessing Passkeys in the Battle Against AI-Powered Cyber Threats.pptx
 
Extensible Python: Robustness through Addition - PyCon 2024
Extensible Python: Robustness through Addition - PyCon 2024Extensible Python: Robustness through Addition - PyCon 2024
Extensible Python: Robustness through Addition - PyCon 2024
 
“Iamnobody89757” Understanding the Mysterious of Digital Identity.pdf
“Iamnobody89757” Understanding the Mysterious of Digital Identity.pdf“Iamnobody89757” Understanding the Mysterious of Digital Identity.pdf
“Iamnobody89757” Understanding the Mysterious of Digital Identity.pdf
 
WebAssembly is Key to Better LLM Performance
WebAssembly is Key to Better LLM PerformanceWebAssembly is Key to Better LLM Performance
WebAssembly is Key to Better LLM Performance
 
TopCryptoSupers 12thReport OrionX May2024
TopCryptoSupers 12thReport OrionX May2024TopCryptoSupers 12thReport OrionX May2024
TopCryptoSupers 12thReport OrionX May2024
 
Simplified FDO Manufacturing Flow with TPMs _ Liam at Infineon.pdf
Simplified FDO Manufacturing Flow with TPMs _ Liam at Infineon.pdfSimplified FDO Manufacturing Flow with TPMs _ Liam at Infineon.pdf
Simplified FDO Manufacturing Flow with TPMs _ Liam at Infineon.pdf
 
The Metaverse: Are We There Yet?
The  Metaverse:    Are   We  There  Yet?The  Metaverse:    Are   We  There  Yet?
The Metaverse: Are We There Yet?
 
Choosing the Right FDO Deployment Model for Your Application _ Geoffrey at In...
Choosing the Right FDO Deployment Model for Your Application _ Geoffrey at In...Choosing the Right FDO Deployment Model for Your Application _ Geoffrey at In...
Choosing the Right FDO Deployment Model for Your Application _ Geoffrey at In...
 
State of the Smart Building Startup Landscape 2024!
State of the Smart Building Startup Landscape 2024!State of the Smart Building Startup Landscape 2024!
State of the Smart Building Startup Landscape 2024!
 

Working with xml data

  • 1.
  • 2. Document Object Model (DOM) provide standards that define the structure and a standard programming interface that can be used in a wide variety of environments and applications for XML documents.  Classes that support the DOM are typically capable of random access navigation and modification of the XML document.  The XML classes are accessible by setting a reference to the System.Xml.dll file. The System.Data.dll file also extends the System.Xml namespace.
  • 3. XmlDocument  XmlDataDocument  XPathDocument  XmlConvert  XPathNavigator  XmlNodeReader  XmlTextReader  XmlTextWriter  XmlReader  XslTransform
  • 4. The XML Classes  Creating a New XmlDocument from Scratch  Parsing XmlDocuments (using DOM and XPathNavigator)  Searching the XmlDocument (using DOM and XPathNavigator)  Writing an XML File Using the XmlTextWriter  Reading an XML File Using the XmlTextReader  Modifying an XML Document  Validating XML Documents  Using LINQ to XML
  • 5. LINQ to XML is a LINQ-enabled, in-memory XML programming interface that enables you to work with XML from within the .NET Framework programming languages.  LINQ to XML is like the Document Object Model (DOM) in that it brings the XML document into memory. You can query and modify the document, and after you modify it you can save it to a file or serialize it and send it over the Internet. However, LINQ to XML differs from DOM: It provides a new object model that is lighter weight and easier to work with, and that takes advantage of language improvements in Visual C# 2008.
  • 6. The most important advantage of LINQ to XML is its integration with Language-Integrated Query (LINQ). This integration enables you to write queries on the in-memory XML document to retrieve collections of elements and attributes. The query capability of LINQ to XML is comparable in functionality (although not in syntax) to XPath and XQuery. The integration of LINQ in Visual C# 2008 provides stronger typing, compile-time checking, and improved debugger support.  Another advantage of LINQ to XML is the ability to use query results as parameters to XElement and XAttribute object constructors enables a powerful approach to creating XML trees. This approach, called functional construction, enables developers to easily transform XML trees from one shape to another.
  • 7. IEnumerable<XElement> partNos = from item in purchaseOrder.Descendants("Item") where (int) item.Element("Quantity") * (decimal) item.Element("USPrice") > 100 orderby (string)item.Element("PartNumber") select item;