SlideShare a Scribd company logo
1 of 17
XML For Dummies Book Author : Lucinda Dykes & Ed Tittle Slides Prepared By: Son TN Chapter 14 : Processing XML
Contents Frankly, My Dear, I Don’t Give a DOM What 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 document XML DOM - standard model for XML documents HTML DOM - standard model for HTML documents The DOM defines the objects and properties of all document elements, and the methods (interface) to access them.
14.1.2 The XML DOM The XML DOM is: A standard object model for XML A standard programming interface for XML  Platform- and language-independent  A W3C standard The 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 family The 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 structure A 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 XSL XSL-FO and XSLT stylesheets are XML documents. ,[object Object]
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 DOM To 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 browser For example  when Internet Explorer 6 displays content using an XSL- FO stylesheet, two processes actually occur Internet 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 XML A 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 them Many 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 time There 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 documents The version of the different specifications (DTD, schema, and so on) that it supports If 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

What's hot (20)

XML
XMLXML
XML
 
Full xml
Full xmlFull xml
Full xml
 
Intro XML for archivists (2011)
Intro XML for archivists (2011)Intro XML for archivists (2011)
Intro XML for archivists (2011)
 
01 Xml Begin
01 Xml Begin01 Xml Begin
01 Xml Begin
 
[DSBW Spring 2010] Unit 10: XML and Web And beyond
[DSBW Spring 2010] Unit 10: XML and Web And beyond[DSBW Spring 2010] Unit 10: XML and Web And beyond
[DSBW Spring 2010] Unit 10: XML and Web And beyond
 
XML
XMLXML
XML
 
XML
XMLXML
XML
 
Bt0078
Bt0078Bt0078
Bt0078
 
XML Databases
XML DatabasesXML Databases
XML Databases
 
EXTENSIBLE MARKUP LANGUAGE BY SAIKIRAN PANJALA
EXTENSIBLE MARKUP LANGUAGE BY SAIKIRAN PANJALAEXTENSIBLE MARKUP LANGUAGE BY SAIKIRAN PANJALA
EXTENSIBLE MARKUP LANGUAGE BY SAIKIRAN PANJALA
 
Building XML Based Applications
Building XML Based ApplicationsBuilding XML Based Applications
Building XML Based Applications
 
Xml2
Xml2Xml2
Xml2
 
Xml 215-presentation
Xml 215-presentationXml 215-presentation
Xml 215-presentation
 
Xml overview
Xml overviewXml overview
Xml overview
 
CTDA Workshop on XML and MODS
CTDA Workshop on XML and MODSCTDA Workshop on XML and MODS
CTDA Workshop on XML and MODS
 
XML Technologies
XML TechnologiesXML Technologies
XML Technologies
 
Markup Languages
Markup Languages Markup Languages
Markup Languages
 
Xml description
Xml descriptionXml description
Xml description
 
Xml
XmlXml
Xml
 
Xml and xml processor
Xml and xml processorXml and xml processor
Xml and xml processor
 

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

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

Xml material
Xml materialXml material
Xml material
 
Xml material
Xml materialXml material
Xml material
 
Xml material
Xml materialXml material
Xml material
 
Introduction to xml
Introduction to xmlIntroduction to xml
Introduction to xml
 
Oracle soa xml faq
Oracle soa xml faqOracle soa xml faq
Oracle soa xml faq
 
Xml 150323102007-conversion-gate01
Xml 150323102007-conversion-gate01Xml 150323102007-conversion-gate01
Xml 150323102007-conversion-gate01
 
Introduction to xml
Introduction to xmlIntroduction to xml
Introduction to xml
 
Xml viva questions
Xml viva questionsXml viva questions
Xml viva questions
 
Xml
XmlXml
Xml
 
XML DTD Validate
XML DTD ValidateXML DTD Validate
XML DTD Validate
 
Web Services Part 1
Web Services Part 1Web Services Part 1
Web Services Part 1
 
Understanding Dom
Understanding DomUnderstanding Dom
Understanding Dom
 
Xml and xml processor
Xml and xml processorXml and xml processor
Xml and xml processor
 
BusinessAnalyst_Training.pptx
BusinessAnalyst_Training.pptxBusinessAnalyst_Training.pptx
BusinessAnalyst_Training.pptx
 
paper about xml
paper about xmlpaper about xml
paper about xml
 
Sgml and xml
Sgml and xmlSgml and xml
Sgml and xml
 
UNIT-1 Web services
UNIT-1 Web servicesUNIT-1 Web services
UNIT-1 Web services
 
Introduction To Docbook 4 .5 Authoring
Introduction To Docbook 4 .5   AuthoringIntroduction To Docbook 4 .5   Authoring
Introduction To Docbook 4 .5 Authoring
 
XML - Extensive Markup Language
XML - Extensive Markup LanguageXML - Extensive Markup Language
XML - Extensive Markup Language
 
Markup For Dummies (Russ Ward)
Markup For Dummies (Russ Ward)Markup For Dummies (Russ Ward)
Markup For Dummies (Russ Ward)
 

More from phanleson

Learning spark ch01 - Introduction to Data Analysis with Spark
Learning spark ch01 - Introduction to Data Analysis with SparkLearning spark ch01 - Introduction to Data Analysis with Spark
Learning spark ch01 - Introduction to Data Analysis with Sparkphanleson
 
Firewall - Network Defense in Depth Firewalls
Firewall - Network Defense in Depth FirewallsFirewall - Network Defense in Depth Firewalls
Firewall - Network Defense in Depth Firewallsphanleson
 
Mobile Security - Wireless hacking
Mobile Security - Wireless hackingMobile Security - Wireless hacking
Mobile Security - Wireless hackingphanleson
 
Authentication in wireless - Security in Wireless Protocols
Authentication in wireless - Security in Wireless ProtocolsAuthentication in wireless - Security in Wireless Protocols
Authentication in wireless - Security in Wireless Protocolsphanleson
 
E-Commerce Security - Application attacks - Server Attacks
E-Commerce Security - Application attacks - Server AttacksE-Commerce Security - Application attacks - Server Attacks
E-Commerce Security - Application attacks - Server Attacksphanleson
 
Hacking web applications
Hacking web applicationsHacking web applications
Hacking web applicationsphanleson
 
HBase In Action - Chapter 04: HBase table design
HBase In Action - Chapter 04: HBase table designHBase In Action - Chapter 04: HBase table design
HBase In Action - Chapter 04: HBase table designphanleson
 
HBase In Action - Chapter 10 - Operations
HBase In Action - Chapter 10 - OperationsHBase In Action - Chapter 10 - Operations
HBase In Action - Chapter 10 - Operationsphanleson
 
Hbase in action - Chapter 09: Deploying HBase
Hbase in action - Chapter 09: Deploying HBaseHbase in action - Chapter 09: Deploying HBase
Hbase in action - Chapter 09: Deploying HBasephanleson
 
Learning spark ch11 - Machine Learning with MLlib
Learning spark ch11 - Machine Learning with MLlibLearning spark ch11 - Machine Learning with MLlib
Learning spark ch11 - Machine Learning with MLlibphanleson
 
Learning spark ch10 - Spark Streaming
Learning spark ch10 - Spark StreamingLearning spark ch10 - Spark Streaming
Learning spark ch10 - Spark Streamingphanleson
 
Learning spark ch09 - Spark SQL
Learning spark ch09 - Spark SQLLearning spark ch09 - Spark SQL
Learning spark ch09 - Spark SQLphanleson
 
Learning spark ch07 - Running on a Cluster
Learning spark ch07 - Running on a ClusterLearning spark ch07 - Running on a Cluster
Learning spark ch07 - Running on a Clusterphanleson
 
Learning spark ch06 - Advanced Spark Programming
Learning spark ch06 - Advanced Spark ProgrammingLearning spark ch06 - Advanced Spark Programming
Learning spark ch06 - Advanced Spark Programmingphanleson
 
Learning spark ch05 - Loading and Saving Your Data
Learning spark ch05 - Loading and Saving Your DataLearning spark ch05 - Loading and Saving Your Data
Learning spark ch05 - Loading and Saving Your Dataphanleson
 
Learning spark ch04 - Working with Key/Value Pairs
Learning spark ch04 - Working with Key/Value PairsLearning spark ch04 - Working with Key/Value Pairs
Learning spark ch04 - Working with Key/Value Pairsphanleson
 
Learning spark ch01 - Introduction to Data Analysis with Spark
Learning spark ch01 - Introduction to Data Analysis with SparkLearning spark ch01 - Introduction to Data Analysis with Spark
Learning spark ch01 - Introduction to Data Analysis with Sparkphanleson
 
Hướng Dẫn Đăng Ký LibertaGia - A guide and introduciton about Libertagia
Hướng Dẫn Đăng Ký LibertaGia - A guide and introduciton about LibertagiaHướng Dẫn Đăng Ký LibertaGia - A guide and introduciton about Libertagia
Hướng Dẫn Đăng Ký LibertaGia - A guide and introduciton about Libertagiaphanleson
 
Lecture 1 - Getting to know XML
Lecture 1 - Getting to know XMLLecture 1 - Getting to know XML
Lecture 1 - Getting to know XMLphanleson
 
Lecture 4 - Adding XTHML for the Web
Lecture  4 - Adding XTHML for the WebLecture  4 - Adding XTHML for the Web
Lecture 4 - Adding XTHML for the Webphanleson
 

More from phanleson (20)

Learning spark ch01 - Introduction to Data Analysis with Spark
Learning spark ch01 - Introduction to Data Analysis with SparkLearning spark ch01 - Introduction to Data Analysis with Spark
Learning spark ch01 - Introduction to Data Analysis with Spark
 
Firewall - Network Defense in Depth Firewalls
Firewall - Network Defense in Depth FirewallsFirewall - Network Defense in Depth Firewalls
Firewall - Network Defense in Depth Firewalls
 
Mobile Security - Wireless hacking
Mobile Security - Wireless hackingMobile Security - Wireless hacking
Mobile Security - Wireless hacking
 
Authentication in wireless - Security in Wireless Protocols
Authentication in wireless - Security in Wireless ProtocolsAuthentication in wireless - Security in Wireless Protocols
Authentication in wireless - Security in Wireless Protocols
 
E-Commerce Security - Application attacks - Server Attacks
E-Commerce Security - Application attacks - Server AttacksE-Commerce Security - Application attacks - Server Attacks
E-Commerce Security - Application attacks - Server Attacks
 
Hacking web applications
Hacking web applicationsHacking web applications
Hacking web applications
 
HBase In Action - Chapter 04: HBase table design
HBase In Action - Chapter 04: HBase table designHBase In Action - Chapter 04: HBase table design
HBase In Action - Chapter 04: HBase table design
 
HBase In Action - Chapter 10 - Operations
HBase In Action - Chapter 10 - OperationsHBase In Action - Chapter 10 - Operations
HBase In Action - Chapter 10 - Operations
 
Hbase in action - Chapter 09: Deploying HBase
Hbase in action - Chapter 09: Deploying HBaseHbase in action - Chapter 09: Deploying HBase
Hbase in action - Chapter 09: Deploying HBase
 
Learning spark ch11 - Machine Learning with MLlib
Learning spark ch11 - Machine Learning with MLlibLearning spark ch11 - Machine Learning with MLlib
Learning spark ch11 - Machine Learning with MLlib
 
Learning spark ch10 - Spark Streaming
Learning spark ch10 - Spark StreamingLearning spark ch10 - Spark Streaming
Learning spark ch10 - Spark Streaming
 
Learning spark ch09 - Spark SQL
Learning spark ch09 - Spark SQLLearning spark ch09 - Spark SQL
Learning spark ch09 - Spark SQL
 
Learning spark ch07 - Running on a Cluster
Learning spark ch07 - Running on a ClusterLearning spark ch07 - Running on a Cluster
Learning spark ch07 - Running on a Cluster
 
Learning spark ch06 - Advanced Spark Programming
Learning spark ch06 - Advanced Spark ProgrammingLearning spark ch06 - Advanced Spark Programming
Learning spark ch06 - Advanced Spark Programming
 
Learning spark ch05 - Loading and Saving Your Data
Learning spark ch05 - Loading and Saving Your DataLearning spark ch05 - Loading and Saving Your Data
Learning spark ch05 - Loading and Saving Your Data
 
Learning spark ch04 - Working with Key/Value Pairs
Learning spark ch04 - Working with Key/Value PairsLearning spark ch04 - Working with Key/Value Pairs
Learning spark ch04 - Working with Key/Value Pairs
 
Learning spark ch01 - Introduction to Data Analysis with Spark
Learning spark ch01 - Introduction to Data Analysis with SparkLearning spark ch01 - Introduction to Data Analysis with Spark
Learning spark ch01 - Introduction to Data Analysis with Spark
 
Hướng Dẫn Đăng Ký LibertaGia - A guide and introduciton about Libertagia
Hướng Dẫn Đăng Ký LibertaGia - A guide and introduciton about LibertagiaHướng Dẫn Đăng Ký LibertaGia - A guide and introduciton about Libertagia
Hướng Dẫn Đăng Ký LibertaGia - A guide and introduciton about Libertagia
 
Lecture 1 - Getting to know XML
Lecture 1 - Getting to know XMLLecture 1 - Getting to know XML
Lecture 1 - Getting to know XML
 
Lecture 4 - Adding XTHML for the Web
Lecture  4 - Adding XTHML for the WebLecture  4 - Adding XTHML for the Web
Lecture 4 - Adding XTHML for the Web
 

Recently uploaded

Driving Behavioral Change for Information Management through Data-Driven Gree...
Driving Behavioral Change for Information Management through Data-Driven Gree...Driving Behavioral Change for Information Management through Data-Driven Gree...
Driving Behavioral Change for Information Management through Data-Driven Gree...Enterprise Knowledge
 
Exploring the Future Potential of AI-Enabled Smartphone Processors
Exploring the Future Potential of AI-Enabled Smartphone ProcessorsExploring the Future Potential of AI-Enabled Smartphone Processors
Exploring the Future Potential of AI-Enabled Smartphone Processorsdebabhi2
 
CNv6 Instructor Chapter 6 Quality of Service
CNv6 Instructor Chapter 6 Quality of ServiceCNv6 Instructor Chapter 6 Quality of Service
CNv6 Instructor Chapter 6 Quality of Servicegiselly40
 
Handwritten Text Recognition for manuscripts and early printed texts
Handwritten Text Recognition for manuscripts and early printed textsHandwritten Text Recognition for manuscripts and early printed texts
Handwritten Text Recognition for manuscripts and early printed textsMaria Levchenko
 
Factors to Consider When Choosing Accounts Payable Services Providers.pptx
Factors to Consider When Choosing Accounts Payable Services Providers.pptxFactors to Consider When Choosing Accounts Payable Services Providers.pptx
Factors to Consider When Choosing Accounts Payable Services Providers.pptxKatpro Technologies
 
Histor y of HAM Radio presentation slide
Histor y of HAM Radio presentation slideHistor y of HAM Radio presentation slide
Histor y of HAM Radio presentation slidevu2urc
 
Tata AIG General Insurance Company - Insurer Innovation Award 2024
Tata AIG General Insurance Company - Insurer Innovation Award 2024Tata AIG General Insurance Company - Insurer Innovation Award 2024
Tata AIG General Insurance Company - Insurer Innovation Award 2024The Digital Insurer
 
TrustArc Webinar - Stay Ahead of US State Data Privacy Law Developments
TrustArc Webinar - Stay Ahead of US State Data Privacy Law DevelopmentsTrustArc Webinar - Stay Ahead of US State Data Privacy Law Developments
TrustArc Webinar - Stay Ahead of US State Data Privacy Law DevelopmentsTrustArc
 
08448380779 Call Girls In Civil Lines Women Seeking Men
08448380779 Call Girls In Civil Lines Women Seeking Men08448380779 Call Girls In Civil Lines Women Seeking Men
08448380779 Call Girls In Civil Lines Women Seeking MenDelhi Call girls
 
Boost Fertility New Invention Ups Success Rates.pdf
Boost Fertility New Invention Ups Success Rates.pdfBoost Fertility New Invention Ups Success Rates.pdf
Boost Fertility New Invention Ups Success Rates.pdfsudhanshuwaghmare1
 
A Year of the Servo Reboot: Where Are We Now?
A Year of the Servo Reboot: Where Are We Now?A Year of the Servo Reboot: Where Are We Now?
A Year of the Servo Reboot: Where Are We Now?Igalia
 
08448380779 Call Girls In Greater Kailash - I Women Seeking Men
08448380779 Call Girls In Greater Kailash - I Women Seeking Men08448380779 Call Girls In Greater Kailash - I Women Seeking Men
08448380779 Call Girls In Greater Kailash - I Women Seeking MenDelhi Call girls
 
The 7 Things I Know About Cyber Security After 25 Years | April 2024
The 7 Things I Know About Cyber Security After 25 Years | April 2024The 7 Things I Know About Cyber Security After 25 Years | April 2024
The 7 Things I Know About Cyber Security After 25 Years | April 2024Rafal Los
 
Finology Group – Insurtech Innovation Award 2024
Finology Group – Insurtech Innovation Award 2024Finology Group – Insurtech Innovation Award 2024
Finology Group – Insurtech Innovation Award 2024The Digital Insurer
 
Axa Assurance Maroc - Insurer Innovation Award 2024
Axa Assurance Maroc - Insurer Innovation Award 2024Axa Assurance Maroc - Insurer Innovation Award 2024
Axa Assurance Maroc - Insurer Innovation Award 2024The Digital Insurer
 
What Are The Drone Anti-jamming Systems Technology?
What Are The Drone Anti-jamming Systems Technology?What Are The Drone Anti-jamming Systems Technology?
What Are The Drone Anti-jamming Systems Technology?Antenna Manufacturer Coco
 
Workshop - Best of Both Worlds_ Combine KG and Vector search for enhanced R...
Workshop - Best of Both Worlds_ Combine  KG and Vector search for  enhanced R...Workshop - Best of Both Worlds_ Combine  KG and Vector search for  enhanced R...
Workshop - Best of Both Worlds_ Combine KG and Vector search for enhanced R...Neo4j
 
Automating Google Workspace (GWS) & more with Apps Script
Automating Google Workspace (GWS) & more with Apps ScriptAutomating Google Workspace (GWS) & more with Apps Script
Automating Google Workspace (GWS) & more with Apps Scriptwesley chun
 
Raspberry Pi 5: Challenges and Solutions in Bringing up an OpenGL/Vulkan Driv...
Raspberry Pi 5: Challenges and Solutions in Bringing up an OpenGL/Vulkan Driv...Raspberry Pi 5: Challenges and Solutions in Bringing up an OpenGL/Vulkan Driv...
Raspberry Pi 5: Challenges and Solutions in Bringing up an OpenGL/Vulkan Driv...Igalia
 
Boost PC performance: How more available memory can improve productivity
Boost PC performance: How more available memory can improve productivityBoost PC performance: How more available memory can improve productivity
Boost PC performance: How more available memory can improve productivityPrincipled Technologies
 

Recently uploaded (20)

Driving Behavioral Change for Information Management through Data-Driven Gree...
Driving Behavioral Change for Information Management through Data-Driven Gree...Driving Behavioral Change for Information Management through Data-Driven Gree...
Driving Behavioral Change for Information Management through Data-Driven Gree...
 
Exploring the Future Potential of AI-Enabled Smartphone Processors
Exploring the Future Potential of AI-Enabled Smartphone ProcessorsExploring the Future Potential of AI-Enabled Smartphone Processors
Exploring the Future Potential of AI-Enabled Smartphone Processors
 
CNv6 Instructor Chapter 6 Quality of Service
CNv6 Instructor Chapter 6 Quality of ServiceCNv6 Instructor Chapter 6 Quality of Service
CNv6 Instructor Chapter 6 Quality of Service
 
Handwritten Text Recognition for manuscripts and early printed texts
Handwritten Text Recognition for manuscripts and early printed textsHandwritten Text Recognition for manuscripts and early printed texts
Handwritten Text Recognition for manuscripts and early printed texts
 
Factors to Consider When Choosing Accounts Payable Services Providers.pptx
Factors to Consider When Choosing Accounts Payable Services Providers.pptxFactors to Consider When Choosing Accounts Payable Services Providers.pptx
Factors to Consider When Choosing Accounts Payable Services Providers.pptx
 
Histor y of HAM Radio presentation slide
Histor y of HAM Radio presentation slideHistor y of HAM Radio presentation slide
Histor y of HAM Radio presentation slide
 
Tata AIG General Insurance Company - Insurer Innovation Award 2024
Tata AIG General Insurance Company - Insurer Innovation Award 2024Tata AIG General Insurance Company - Insurer Innovation Award 2024
Tata AIG General Insurance Company - Insurer Innovation Award 2024
 
TrustArc Webinar - Stay Ahead of US State Data Privacy Law Developments
TrustArc Webinar - Stay Ahead of US State Data Privacy Law DevelopmentsTrustArc Webinar - Stay Ahead of US State Data Privacy Law Developments
TrustArc Webinar - Stay Ahead of US State Data Privacy Law Developments
 
08448380779 Call Girls In Civil Lines Women Seeking Men
08448380779 Call Girls In Civil Lines Women Seeking Men08448380779 Call Girls In Civil Lines Women Seeking Men
08448380779 Call Girls In Civil Lines Women Seeking Men
 
Boost Fertility New Invention Ups Success Rates.pdf
Boost Fertility New Invention Ups Success Rates.pdfBoost Fertility New Invention Ups Success Rates.pdf
Boost Fertility New Invention Ups Success Rates.pdf
 
A Year of the Servo Reboot: Where Are We Now?
A Year of the Servo Reboot: Where Are We Now?A Year of the Servo Reboot: Where Are We Now?
A Year of the Servo Reboot: Where Are We Now?
 
08448380779 Call Girls In Greater Kailash - I Women Seeking Men
08448380779 Call Girls In Greater Kailash - I Women Seeking Men08448380779 Call Girls In Greater Kailash - I Women Seeking Men
08448380779 Call Girls In Greater Kailash - I Women Seeking Men
 
The 7 Things I Know About Cyber Security After 25 Years | April 2024
The 7 Things I Know About Cyber Security After 25 Years | April 2024The 7 Things I Know About Cyber Security After 25 Years | April 2024
The 7 Things I Know About Cyber Security After 25 Years | April 2024
 
Finology Group – Insurtech Innovation Award 2024
Finology Group – Insurtech Innovation Award 2024Finology Group – Insurtech Innovation Award 2024
Finology Group – Insurtech Innovation Award 2024
 
Axa Assurance Maroc - Insurer Innovation Award 2024
Axa Assurance Maroc - Insurer Innovation Award 2024Axa Assurance Maroc - Insurer Innovation Award 2024
Axa Assurance Maroc - Insurer Innovation Award 2024
 
What Are The Drone Anti-jamming Systems Technology?
What Are The Drone Anti-jamming Systems Technology?What Are The Drone Anti-jamming Systems Technology?
What Are The Drone Anti-jamming Systems Technology?
 
Workshop - Best of Both Worlds_ Combine KG and Vector search for enhanced R...
Workshop - Best of Both Worlds_ Combine  KG and Vector search for  enhanced R...Workshop - Best of Both Worlds_ Combine  KG and Vector search for  enhanced R...
Workshop - Best of Both Worlds_ Combine KG and Vector search for enhanced R...
 
Automating Google Workspace (GWS) & more with Apps Script
Automating Google Workspace (GWS) & more with Apps ScriptAutomating Google Workspace (GWS) & more with Apps Script
Automating Google Workspace (GWS) & more with Apps Script
 
Raspberry Pi 5: Challenges and Solutions in Bringing up an OpenGL/Vulkan Driv...
Raspberry Pi 5: Challenges and Solutions in Bringing up an OpenGL/Vulkan Driv...Raspberry Pi 5: Challenges and Solutions in Bringing up an OpenGL/Vulkan Driv...
Raspberry Pi 5: Challenges and Solutions in Bringing up an OpenGL/Vulkan Driv...
 
Boost PC performance: How more available memory can improve productivity
Boost PC performance: How more available memory can improve productivityBoost PC performance: How more available memory can improve productivity
Boost PC performance: How more available memory can improve productivity
 

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

  • 1. XML For Dummies Book Author : Lucinda Dykes & Ed Tittle Slides Prepared By: Son TN Chapter 14 : Processing XML
  • 2. Contents Frankly, My Dear, I Don’t Give a DOM What 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 document XML DOM - standard model for XML documents HTML DOM - standard model for HTML documents The DOM defines the objects and properties of all document elements, and the methods (interface) to access them.
  • 5. 14.1.2 The XML DOM The XML DOM is: A standard object model for XML A standard programming interface for XML Platform- and language-independent A W3C standard The 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 family The 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 structure A 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.
  • 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 DOM To 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 browser For example when Internet Explorer 6 displays content using an XSL- FO stylesheet, two processes actually occur Internet 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 XML A 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 them Many 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 time There 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 documents The version of the different specifications (DTD, schema, and so on) that it supports If 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?