SlideShare a Scribd company logo
XML For DummiesBook Author : Lucinda Dykes & Ed TittleSlides Prepared By: Son TNChapter 14 : Processing XML
ContentsFrankly, My Dear, I Don’t Give a DOMWhat Goes In Must Come Out: Processing XML
14.1 Frankly, My Dear, I Don’t Give a DOM
14.1.1 What is the DOM?The DOM is a W3C (World Wide Web Consortium) standard.The DOM defines a standard for accessing documents like XML and HTML:A Document Object Model (DOM) is a programming interface that allows programs and programming languages to access and update the content, structure, and style of documents in a standard way.The DOM is separated into 3 different parts / levels:Core DOM - standard model for any structured documentXML DOM - standard model for XML documentsHTML DOM - standard model for HTML documentsThe DOM defines the objects and properties of all document elements, and the methods (interface) to access them.
14.1.2 The XML DOMThe XML DOM is:A standard object model for XMLA standard programming interface for XML Platform- and language-independent A W3C standardThe XML DOM defines the objects and properties of all XML elements, and the methods (interface) to access them.In other words: The XML DOM is a standard for how to get, change, add, or delete XML elements.
14.1.3  Example You can describe the bookstore.xml document as a series of elements and their content.You can also describe the document as a series of objects — after all, each element in the document is an individual object.All these individual objects are part of the DOM for the bookstore.xml document.<bookInfo><title>The Da Vinci Code</title><author>Brown, Dan</author><publisher>Doubleday</publisher><isbn>0385504209</isbn></bookInfo>The following piece of the document (for example) includes five different objects
14.1.4 Frankly, My Dear, I Don’t Give a DOM (Cont)A DOM shows how each element relates to the others hierarchically.The DOM identifies each unique object in a document according to its position in the document’s hierarchy.As in any hierarchy, the DOM consists of a fairly complex system of relationships that must be adhered to.siblings, parents, …
14.1.4 Frankly, My Dear, I Don’t Give a DOM (Cont)A processoris an application that makes your documents do something.XML processors create a DOM each time they process an XML document so that the programming code can get and work with the content in the document.Figure 14-1 is a grid view of bookstore.xml in XMLSpy. It illustrates how the DOM for this document might look to an XML processor.
14.1.5 Keeping in touch with the familyThe terms parent, child, and sibling are all used to describe element relationships.These relationships have to do with how the elements are nested.For example, in the following bit of markup, the street, city, and state elements are nested within (and children of) the address element:<address><street>1312 Wilshire Blvd</street><city>Santa Monica</city><state>California</state></address>
14.1.6 Understanding DOM structureA tree is a diagramof an XML document’s structure that shows the order of elements and illustrates the relationships between elements in exactly the same way that a family tree illustrates genealogy.A tree is a visual representation of the DOM.XML DOM Tree Example
14.1.6 Understanding DOM structure (Cont)Notice that the tree includes things other than the elements in the document — for example, attributes and element content.The objects included in a DOM are more than just the elements; they’re called nodes when displayed on the DOM tree.Figure 14-2 illustrates some additional types of nodes that a DOM tree can include.There’s not much in any given XML document that you can’t access by using the DOM.
14.1.6.1 Using the DOM and XSLXSL-FO and XSLT stylesheets are XML documents.When an application uses a stylesheet, it processes the stylesheet like any other XML document.
The only difference is that the application applies the stylesheet to the XML document.The stylesheet has its own DOM, as does the XML document; the final transformation or display guided by the stylesheet takes information in both DOMs into account.
14.1.6.2 Web browsers and the DOMTo display XML documents in Web browsers You actually have to apply an XSLT stylesheet to the XML document — which converts XML to HTML or XHTML.Or you can use an XSL-FO stylesheet with the XML document for display in the browserFor example  when Internet Explorer 6 displays content using an XSL-FO stylesheet, two processes actually occurInternet Explorer accesses the DOM that’s created when its processor — Microsoft XML (MSXML) — reads and processes both the XML document and the related XSL-FO stylesheet.The browser uses the document and stylesheet together to determine a the final display of the content.
14.2 What Goes In Must Come Out: Processing XMLA processor takes the code and makes it do something. A processor may be part of :A simple Web browser (such as Internet Explorer or Mozilla).A whole other kind of program — such as a utility that takes in an XML document, grabs the info it’s carrying, and populates an Oracle database.XML processors and the DOM go hand in hand.All Web browsers have HTML processors built into them, and those that can work with XML also have XML processors built into them.If you create a stylesheet in either XSL or CSS, an XML-enabled browser can also open and process that stylesheet.All XML solutions have processors involved in themMany different processors are available for you to choose among.A program for manipulation — processors are written in a variety of languages.
14.2.1 So many processors, so little timeThere are many the XML Parsers / Processors , What makes all these processors different from one another?Each processor has four distinct characteristics:The programming language it was written in.Whether or not it validates documentsThe version of the different specifications (DTD, schema, and so on) that it supportsIf it was written to accompany a particular software or database application
14.2.1 Which processor is right for you?When you’re trying to pick a processor, you should ask yourself the following questions to help narrow your search:What programming language is the rest of your solution using?Do your documents need to be validated during processing?Which XML versions and standards are you using?Does the application framework or database you’re using have a processor?

More Related Content

PDF
XML and XML Applications - Lecture 04 - Web Information Systems (WE-DINF-11912)
PPTX
XML-Extensible Markup Language
PPTX
Xml applications
PPT
uptu web technology unit 2 Xml2
PPTX
Extensible Markup Language (XML)
PPT
uptu web technology unit 2 Xml2
PPT
uptu web technology unit 2 Xml2
PDF
Introduction to XML
XML and XML Applications - Lecture 04 - Web Information Systems (WE-DINF-11912)
XML-Extensible Markup Language
Xml applications
uptu web technology unit 2 Xml2
Extensible Markup Language (XML)
uptu web technology unit 2 Xml2
uptu web technology unit 2 Xml2
Introduction to XML

What's hot (20)

PDF
PPT
Intro XML for archivists (2011)
PPT
01 Xml Begin
PPT
[DSBW Spring 2010] Unit 10: XML and Web And beyond
PDF
XML
DOCX
Bt0078
PPT
XML Databases
PPTX
EXTENSIBLE MARKUP LANGUAGE BY SAIKIRAN PANJALA
PDF
Building XML Based Applications
PPT
Xml 215-presentation
PDF
Xml overview
PDF
CTDA Workshop on XML and MODS
PPT
XML Technologies
PPT
Markup Languages
PPT
Xml description
PPT
PPTX
Xml and xml processor
Intro XML for archivists (2011)
01 Xml Begin
[DSBW Spring 2010] Unit 10: XML and Web And beyond
XML
Bt0078
XML Databases
EXTENSIBLE MARKUP LANGUAGE BY SAIKIRAN PANJALA
Building XML Based Applications
Xml 215-presentation
Xml overview
CTDA Workshop on XML and MODS
XML Technologies
Markup Languages
Xml description
Xml and xml processor
Ad

Similar to Xml For Dummies Chapter 14 Processing Xml it-slideshares.blogspot.com (20)

PDF
Understanding Dom
PPTX
Unit iv xml dom
PPTX
Document object model
PPTX
Xml and xml processor
PPTX
Xml dom
PPTX
buildingxmlbasedapplications-180322042009.pptx
PDF
XML and Related Technologies - Web Technologies (1019888BNR)
PPTX
PPT
Introduction to xml
PPTX
Lecture 4 - Adding XTHML for the Web
PPTX
chapter 4 web authoring unit 4 xml.pptx
PPT
XML Presentation-2
PPTX
BITM3730 10-18.pptx
PPT
uptu web technology unit 2 Xml2
PPTX
Part 7
PPTX
BITM3730 10-31.pptx
Understanding Dom
Unit iv xml dom
Document object model
Xml and xml processor
Xml dom
buildingxmlbasedapplications-180322042009.pptx
XML and Related Technologies - Web Technologies (1019888BNR)
Introduction to xml
Lecture 4 - Adding XTHML for the Web
chapter 4 web authoring unit 4 xml.pptx
XML Presentation-2
BITM3730 10-18.pptx
uptu web technology unit 2 Xml2
Part 7
BITM3730 10-31.pptx
Ad

More from phanleson (20)

PDF
Learning spark ch01 - Introduction to Data Analysis with Spark
PPT
Firewall - Network Defense in Depth Firewalls
PPT
Mobile Security - Wireless hacking
PPT
Authentication in wireless - Security in Wireless Protocols
PPT
E-Commerce Security - Application attacks - Server Attacks
PPT
Hacking web applications
PPTX
HBase In Action - Chapter 04: HBase table design
PPT
HBase In Action - Chapter 10 - Operations
PPT
Hbase in action - Chapter 09: Deploying HBase
PPTX
Learning spark ch11 - Machine Learning with MLlib
PPTX
Learning spark ch10 - Spark Streaming
PPTX
Learning spark ch09 - Spark SQL
PPT
Learning spark ch07 - Running on a Cluster
PPTX
Learning spark ch06 - Advanced Spark Programming
PPTX
Learning spark ch05 - Loading and Saving Your Data
PPTX
Learning spark ch04 - Working with Key/Value Pairs
PPTX
Learning spark ch01 - Introduction to Data Analysis with Spark
PPT
Hướng Dẫn Đăng Ký LibertaGia - A guide and introduciton about Libertagia
PPT
Lecture 1 - Getting to know XML
PPT
Lecture 2 - Using XML for Many Purposes
Learning spark ch01 - Introduction to Data Analysis with Spark
Firewall - Network Defense in Depth Firewalls
Mobile Security - Wireless hacking
Authentication in wireless - Security in Wireless Protocols
E-Commerce Security - Application attacks - Server Attacks
Hacking web applications
HBase In Action - Chapter 04: HBase table design
HBase In Action - Chapter 10 - Operations
Hbase in action - Chapter 09: Deploying HBase
Learning spark ch11 - Machine Learning with MLlib
Learning spark ch10 - Spark Streaming
Learning spark ch09 - Spark SQL
Learning spark ch07 - Running on a Cluster
Learning spark ch06 - Advanced Spark Programming
Learning spark ch05 - Loading and Saving Your Data
Learning spark ch04 - Working with Key/Value Pairs
Learning spark ch01 - Introduction to Data Analysis with Spark
Hướng Dẫn Đăng Ký LibertaGia - A guide and introduciton about Libertagia
Lecture 1 - Getting to know XML
Lecture 2 - Using XML for Many Purposes

Recently uploaded (20)

PPTX
Cloud computing and distributed systems.
PPTX
20250228 LYD VKU AI Blended-Learning.pptx
DOCX
The AUB Centre for AI in Media Proposal.docx
PDF
TokAI - TikTok AI Agent : The First AI Application That Analyzes 10,000+ Vira...
PDF
Advanced methodologies resolving dimensionality complications for autism neur...
PPT
Teaching material agriculture food technology
PDF
Machine learning based COVID-19 study performance prediction
PPTX
Digital-Transformation-Roadmap-for-Companies.pptx
PDF
Unlocking AI with Model Context Protocol (MCP)
PDF
Approach and Philosophy of On baking technology
PPTX
Big Data Technologies - Introduction.pptx
PDF
Agricultural_Statistics_at_a_Glance_2022_0.pdf
PDF
Peak of Data & AI Encore- AI for Metadata and Smarter Workflows
PDF
cuic standard and advanced reporting.pdf
PDF
Encapsulation theory and applications.pdf
PDF
Chapter 3 Spatial Domain Image Processing.pdf
PDF
Spectral efficient network and resource selection model in 5G networks
PDF
Optimiser vos workloads AI/ML sur Amazon EC2 et AWS Graviton
PDF
Encapsulation_ Review paper, used for researhc scholars
PPTX
Understanding_Digital_Forensics_Presentation.pptx
Cloud computing and distributed systems.
20250228 LYD VKU AI Blended-Learning.pptx
The AUB Centre for AI in Media Proposal.docx
TokAI - TikTok AI Agent : The First AI Application That Analyzes 10,000+ Vira...
Advanced methodologies resolving dimensionality complications for autism neur...
Teaching material agriculture food technology
Machine learning based COVID-19 study performance prediction
Digital-Transformation-Roadmap-for-Companies.pptx
Unlocking AI with Model Context Protocol (MCP)
Approach and Philosophy of On baking technology
Big Data Technologies - Introduction.pptx
Agricultural_Statistics_at_a_Glance_2022_0.pdf
Peak of Data & AI Encore- AI for Metadata and Smarter Workflows
cuic standard and advanced reporting.pdf
Encapsulation theory and applications.pdf
Chapter 3 Spatial Domain Image Processing.pdf
Spectral efficient network and resource selection model in 5G networks
Optimiser vos workloads AI/ML sur Amazon EC2 et AWS Graviton
Encapsulation_ Review paper, used for researhc scholars
Understanding_Digital_Forensics_Presentation.pptx

Xml For Dummies Chapter 14 Processing Xml it-slideshares.blogspot.com

  • 1. XML For DummiesBook Author : Lucinda Dykes & Ed TittleSlides Prepared By: Son TNChapter 14 : Processing XML
  • 2. ContentsFrankly, My Dear, I Don’t Give a DOMWhat Goes In Must Come Out: Processing XML
  • 3. 14.1 Frankly, My Dear, I Don’t Give a DOM
  • 4. 14.1.1 What is the DOM?The DOM is a W3C (World Wide Web Consortium) standard.The DOM defines a standard for accessing documents like XML and HTML:A Document Object Model (DOM) is a programming interface that allows programs and programming languages to access and update the content, structure, and style of documents in a standard way.The DOM is separated into 3 different parts / levels:Core DOM - standard model for any structured documentXML DOM - standard model for XML documentsHTML DOM - standard model for HTML documentsThe DOM defines the objects and properties of all document elements, and the methods (interface) to access them.
  • 5. 14.1.2 The XML DOMThe XML DOM is:A standard object model for XMLA standard programming interface for XML Platform- and language-independent A W3C standardThe XML DOM defines the objects and properties of all XML elements, and the methods (interface) to access them.In other words: The XML DOM is a standard for how to get, change, add, or delete XML elements.
  • 6. 14.1.3 Example You can describe the bookstore.xml document as a series of elements and their content.You can also describe the document as a series of objects — after all, each element in the document is an individual object.All these individual objects are part of the DOM for the bookstore.xml document.<bookInfo><title>The Da Vinci Code</title><author>Brown, Dan</author><publisher>Doubleday</publisher><isbn>0385504209</isbn></bookInfo>The following piece of the document (for example) includes five different objects
  • 7. 14.1.4 Frankly, My Dear, I Don’t Give a DOM (Cont)A DOM shows how each element relates to the others hierarchically.The DOM identifies each unique object in a document according to its position in the document’s hierarchy.As in any hierarchy, the DOM consists of a fairly complex system of relationships that must be adhered to.siblings, parents, …
  • 8. 14.1.4 Frankly, My Dear, I Don’t Give a DOM (Cont)A processoris an application that makes your documents do something.XML processors create a DOM each time they process an XML document so that the programming code can get and work with the content in the document.Figure 14-1 is a grid view of bookstore.xml in XMLSpy. It illustrates how the DOM for this document might look to an XML processor.
  • 9. 14.1.5 Keeping in touch with the familyThe terms parent, child, and sibling are all used to describe element relationships.These relationships have to do with how the elements are nested.For example, in the following bit of markup, the street, city, and state elements are nested within (and children of) the address element:<address><street>1312 Wilshire Blvd</street><city>Santa Monica</city><state>California</state></address>
  • 10. 14.1.6 Understanding DOM structureA tree is a diagramof an XML document’s structure that shows the order of elements and illustrates the relationships between elements in exactly the same way that a family tree illustrates genealogy.A tree is a visual representation of the DOM.XML DOM Tree Example
  • 11. 14.1.6 Understanding DOM structure (Cont)Notice that the tree includes things other than the elements in the document — for example, attributes and element content.The objects included in a DOM are more than just the elements; they’re called nodes when displayed on the DOM tree.Figure 14-2 illustrates some additional types of nodes that a DOM tree can include.There’s not much in any given XML document that you can’t access by using the DOM.
  • 12. 14.1.6.1 Using the DOM and XSLXSL-FO and XSLT stylesheets are XML documents.When an application uses a stylesheet, it processes the stylesheet like any other XML document.
  • 13. The only difference is that the application applies the stylesheet to the XML document.The stylesheet has its own DOM, as does the XML document; the final transformation or display guided by the stylesheet takes information in both DOMs into account.
  • 14. 14.1.6.2 Web browsers and the DOMTo display XML documents in Web browsers You actually have to apply an XSLT stylesheet to the XML document — which converts XML to HTML or XHTML.Or you can use an XSL-FO stylesheet with the XML document for display in the browserFor example when Internet Explorer 6 displays content using an XSL-FO stylesheet, two processes actually occurInternet Explorer accesses the DOM that’s created when its processor — Microsoft XML (MSXML) — reads and processes both the XML document and the related XSL-FO stylesheet.The browser uses the document and stylesheet together to determine a the final display of the content.
  • 15. 14.2 What Goes In Must Come Out: Processing XMLA processor takes the code and makes it do something. A processor may be part of :A simple Web browser (such as Internet Explorer or Mozilla).A whole other kind of program — such as a utility that takes in an XML document, grabs the info it’s carrying, and populates an Oracle database.XML processors and the DOM go hand in hand.All Web browsers have HTML processors built into them, and those that can work with XML also have XML processors built into them.If you create a stylesheet in either XSL or CSS, an XML-enabled browser can also open and process that stylesheet.All XML solutions have processors involved in themMany different processors are available for you to choose among.A program for manipulation — processors are written in a variety of languages.
  • 16. 14.2.1 So many processors, so little timeThere are many the XML Parsers / Processors , What makes all these processors different from one another?Each processor has four distinct characteristics:The programming language it was written in.Whether or not it validates documentsThe version of the different specifications (DTD, schema, and so on) that it supportsIf it was written to accompany a particular software or database application
  • 17. 14.2.1 Which processor is right for you?When you’re trying to pick a processor, you should ask yourself the following questions to help narrow your search:What programming language is the rest of your solution using?Do your documents need to be validated during processing?Which XML versions and standards are you using?Does the application framework or database you’re using have a processor?