SlideShare a Scribd company logo
Web Technology
(NCS-504)
Prepared By
Mr.Abhishek Kesharwani
Assistant Professor,UCER Naini,Allahabad
XML DOM
2
XML DOM 
The XML DOM defines a standard for accessing and
manipulating XML.
The DOM is a W3C (World Wide Web Consortium)
standard.
The DOM defines a standard for accessing documents like
XML and HTML:
The W3C Document Object Model (DOM) is a platform and
language-neutral interface that allows programs and scripts to
dynamically access and update the content, structure, and
style of a document.
3
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
4
What is the XML DOM?
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.
5
XML SAX
SAX (Simple API for XML) is an event-
based sequential access parser API developed by the
XML-DEV mailing list for XMLdocuments.
SAX provides a mechanism for reading data from an
XML document that is an alternative to that provided by
the Document Object Model (DOM).
SAX parsers operate on each piece of the XML
document sequentially.
6
Benefits
SAX parsers have some benefits over DOM-style parsers.
 A SAX parser only needs to report each parsing event as it
happens, and normally discards almost all of that information
once reported
Thus, the minimum memory required for a SAX parser is
proportional to the maximum depth of the XML file (i.e., of
the XML tree) and the maximum data involved in a single.
 XML event (such as the name and attributes of a single start-
tag, or the content of a processing instruction, etc.)
7
Drawbacks
The event-driven model of SAX is useful for XML parsing,
but it does have certain drawbacks.
Virtually any kind of XML validation requires access to the
document in full. The most trivial example is that an
attribute declared in the DTD to be of type IDREF, requires
that there be an element in the document that uses the same
value for an ID attribute.
To validate this in a SAX parser, one must keep track of all
ID attributes (any one of them might end up being referenced
by an IDREF attribute at the very end); as well as every
IDREF attribute until it is resolved.
8

More Related Content

What's hot

XML
XMLXML
Xml and xml processor
Xml and xml processorXml and xml processor
Xml and xml processor
Himanshu Soni
 
Xml presentation
Xml presentationXml presentation
Xml presentation
Miguel Angel Teheran Garcia
 
Xml Presentation-3
Xml Presentation-3Xml Presentation-3
Xml Presentation-3Sudharsan S
 
Introduction to XML and Databases
Introduction to XML and DatabasesIntroduction to XML and Databases
Introduction to XML and Databases
torp42
 
10. XML in DBMS
10. XML in DBMS10. XML in DBMS
10. XML in DBMSkoolkampus
 
01 xml document structure
01 xml document structure01 xml document structure
01 xml document structure
Baskarkncet
 
DTD
DTDDTD
Xml Presentation-1
Xml Presentation-1Xml Presentation-1
Xml Presentation-1Sudharsan S
 
Dtd
DtdDtd
XML-Extensible Markup Language
XML-Extensible Markup Language XML-Extensible Markup Language
XML-Extensible Markup Language
Ann Joseph
 
Extensible Markup Language (XML)
Extensible Markup Language (XML)Extensible Markup Language (XML)
Extensible Markup Language (XML)
AakankshaR
 
XML Presentation-2
XML Presentation-2XML Presentation-2
XML Presentation-2Sudharsan S
 
XML and Databases
XML and DatabasesXML and Databases
XML and Databases
Cittrex
 
Building XML Based Applications
Building XML Based ApplicationsBuilding XML Based Applications
Building XML Based Applications
Prabu U
 
XML
XMLXML

What's hot (20)

XML
XMLXML
XML
 
Xml and xml processor
Xml and xml processorXml and xml processor
Xml and xml processor
 
Xml presentation
Xml presentationXml presentation
Xml presentation
 
Xml Presentation-3
Xml Presentation-3Xml Presentation-3
Xml Presentation-3
 
Introduction to XML and Databases
Introduction to XML and DatabasesIntroduction to XML and Databases
Introduction to XML and Databases
 
10. XML in DBMS
10. XML in DBMS10. XML in DBMS
10. XML in DBMS
 
01 xml document structure
01 xml document structure01 xml document structure
01 xml document structure
 
DTD
DTDDTD
DTD
 
XML
XMLXML
XML
 
Xml by Luqman
Xml by LuqmanXml by Luqman
Xml by Luqman
 
Xml Presentation-1
Xml Presentation-1Xml Presentation-1
Xml Presentation-1
 
Dtd
DtdDtd
Dtd
 
XML-Extensible Markup Language
XML-Extensible Markup Language XML-Extensible Markup Language
XML-Extensible Markup Language
 
Introduction to XML
Introduction to XMLIntroduction to XML
Introduction to XML
 
Extensible Markup Language (XML)
Extensible Markup Language (XML)Extensible Markup Language (XML)
Extensible Markup Language (XML)
 
XML Presentation-2
XML Presentation-2XML Presentation-2
XML Presentation-2
 
XML and Databases
XML and DatabasesXML and Databases
XML and Databases
 
Xml2
Xml2Xml2
Xml2
 
Building XML Based Applications
Building XML Based ApplicationsBuilding XML Based Applications
Building XML Based Applications
 
XML
XMLXML
XML
 

Viewers also liked

Takex DA-4800H Instruction Manual
Takex DA-4800H Instruction ManualTakex DA-4800H Instruction Manual
Takex DA-4800H Instruction Manual
JMAC Supply
 
Nebosh Certificate
Nebosh CertificateNebosh Certificate
Nebosh CertificatePeter Miller
 
Sıfat şarkısı
Sıfat şarkısıSıfat şarkısı
Sıfat şarkısı
aysebal
 
Self-branding slide deck
Self-branding slide deckSelf-branding slide deck
Self-branding slide deck
imhuishan
 
Basquetebol
BasquetebolBasquetebol
Basquetebol
guest2932aa
 
Program Acara Radio Lazuar 94.1 FM
Program Acara Radio Lazuar 94.1 FM Program Acara Radio Lazuar 94.1 FM
Program Acara Radio Lazuar 94.1 FM
Lazuarfm Karawang
 
Pet Care Industry Analysis
Pet Care Industry AnalysisPet Care Industry Analysis
Pet Care Industry Analysis
Emrldwlf
 
Basketball
BasketballBasketball
Basketball
Ronalyn Manzanilla
 
Data Science at Udemy
Data Science at UdemyData Science at Udemy
Data Science at Udemy
Ankara Big Data Meetup
 

Viewers also liked (15)

Degrisogono
DegrisogonoDegrisogono
Degrisogono
 
Pb in-100 at
Pb in-100 atPb in-100 at
Pb in-100 at
 
Takex DA-4800H Instruction Manual
Takex DA-4800H Instruction ManualTakex DA-4800H Instruction Manual
Takex DA-4800H Instruction Manual
 
Nebosh Certificate
Nebosh CertificateNebosh Certificate
Nebosh Certificate
 
Bryans Resume 2016
Bryans Resume 2016Bryans Resume 2016
Bryans Resume 2016
 
Catia
CatiaCatia
Catia
 
Xxx
XxxXxx
Xxx
 
Sıfat şarkısı
Sıfat şarkısıSıfat şarkısı
Sıfat şarkısı
 
Self-branding slide deck
Self-branding slide deckSelf-branding slide deck
Self-branding slide deck
 
diabetes mellitus project
diabetes mellitus projectdiabetes mellitus project
diabetes mellitus project
 
Basquetebol
BasquetebolBasquetebol
Basquetebol
 
Program Acara Radio Lazuar 94.1 FM
Program Acara Radio Lazuar 94.1 FM Program Acara Radio Lazuar 94.1 FM
Program Acara Radio Lazuar 94.1 FM
 
Pet Care Industry Analysis
Pet Care Industry AnalysisPet Care Industry Analysis
Pet Care Industry Analysis
 
Basketball
BasketballBasketball
Basketball
 
Data Science at Udemy
Data Science at UdemyData Science at Udemy
Data Science at Udemy
 

Similar to uptu web technology unit 2 Xml2

Xml and xml processor
Xml and xml processorXml and xml processor
Xml and xml processor
Himanshu Soni
 
Applied xml programming for microsoft
Applied xml programming for microsoftApplied xml programming for microsoft
Applied xml programming for microsoftRaghu nath
 
Enhanced xml validation using srml01
Enhanced xml validation using srml01Enhanced xml validation using srml01
Enhanced xml validation using srml01
IJwest
 
Web services Overview in depth
Web services Overview in depthWeb services Overview in depth
Web services Overview in depth
AbdulImrankhan7
 
CTDA Workshop on XML and MODS
CTDA Workshop on XML and MODSCTDA Workshop on XML and MODS
CTDA Workshop on XML and MODS
University of Connecticut Libraries
 
What is xml
What is xmlWhat is xml
What is xml
Aneesa Rahman
 
Python xml processing
Python   xml processingPython   xml processing
Python xml processing
Learnbay Datascience
 
Full xml
Full xmlFull xml
XML
XMLXML
E05412327
E05412327E05412327
E05412327
IOSR-JEN
 
XML Tutor maXbox starter27
XML Tutor maXbox starter27XML Tutor maXbox starter27
XML Tutor maXbox starter27
Max Kleiner
 
XML External Entity (XXE)
XML External Entity (XXE)XML External Entity (XXE)
XML External Entity (XXE)
Jay Thakker
 
Unit iv xml dom
Unit iv xml domUnit iv xml dom
Unit iv xml dom
smitha273566
 

Similar to uptu web technology unit 2 Xml2 (20)

Xml3
Xml3Xml3
Xml3
 
Xml3
Xml3Xml3
Xml3
 
Unit 2.3
Unit 2.3Unit 2.3
Unit 2.3
 
Unit 2.3
Unit 2.3Unit 2.3
Unit 2.3
 
Xml and xml processor
Xml and xml processorXml and xml processor
Xml and xml processor
 
Applied xml programming for microsoft
Applied xml programming for microsoftApplied xml programming for microsoft
Applied xml programming for microsoft
 
Enhanced xml validation using srml01
Enhanced xml validation using srml01Enhanced xml validation using srml01
Enhanced xml validation using srml01
 
Web services Overview in depth
Web services Overview in depthWeb services Overview in depth
Web services Overview in depth
 
CTDA Workshop on XML and MODS
CTDA Workshop on XML and MODSCTDA Workshop on XML and MODS
CTDA Workshop on XML and MODS
 
What is xml
What is xmlWhat is xml
What is xml
 
Python xml processing
Python   xml processingPython   xml processing
Python xml processing
 
Er2000
Er2000Er2000
Er2000
 
Full xml
Full xmlFull xml
Full xml
 
XML
XMLXML
XML
 
E05412327
E05412327E05412327
E05412327
 
XML Tutor maXbox starter27
XML Tutor maXbox starter27XML Tutor maXbox starter27
XML Tutor maXbox starter27
 
XML External Entity (XXE)
XML External Entity (XXE)XML External Entity (XXE)
XML External Entity (XXE)
 
XMl
XMlXMl
XMl
 
Xml
XmlXml
Xml
 
Unit iv xml dom
Unit iv xml domUnit iv xml dom
Unit iv xml dom
 

More from Abhishek Kesharwani

uptu web technology unit 2 html
uptu web technology unit 2 htmluptu web technology unit 2 html
uptu web technology unit 2 html
Abhishek Kesharwani
 
uptu web technology unit 2 html
uptu web technology unit 2 htmluptu web technology unit 2 html
uptu web technology unit 2 html
Abhishek Kesharwani
 
uptu web technology unit 2 html
uptu web technology unit 2 htmluptu web technology unit 2 html
uptu web technology unit 2 html
Abhishek Kesharwani
 
uptu web technology unit 2 html
uptu web technology unit 2 htmluptu web technology unit 2 html
uptu web technology unit 2 html
Abhishek Kesharwani
 
uptu web technology unit 2 html
uptu web technology unit 2 htmluptu web technology unit 2 html
uptu web technology unit 2 html
Abhishek Kesharwani
 
uptu web technology unit 2 Css
uptu web technology unit 2 Cssuptu web technology unit 2 Css
uptu web technology unit 2 Css
Abhishek Kesharwani
 
uptu web technology unit 2 Css
uptu web technology unit 2 Cssuptu web technology unit 2 Css
uptu web technology unit 2 Css
Abhishek Kesharwani
 
Unit 1 web technology uptu slide
Unit 1 web technology uptu slideUnit 1 web technology uptu slide
Unit 1 web technology uptu slide
Abhishek Kesharwani
 
Unit1 Web Technology UPTU UNIT 1
Unit1 Web Technology UPTU UNIT 1 Unit1 Web Technology UPTU UNIT 1
Unit1 Web Technology UPTU UNIT 1
Abhishek Kesharwani
 
Unit1 2
Unit1 2 Unit1 2
Web Technology UPTU UNIT 1
Web Technology UPTU UNIT 1 Web Technology UPTU UNIT 1
Web Technology UPTU UNIT 1
Abhishek Kesharwani
 
Mtech syllabus computer science uptu
Mtech syllabus computer science uptu Mtech syllabus computer science uptu
Mtech syllabus computer science uptu
Abhishek Kesharwani
 

More from Abhishek Kesharwani (20)

uptu web technology unit 2 html
uptu web technology unit 2 htmluptu web technology unit 2 html
uptu web technology unit 2 html
 
uptu web technology unit 2 html
uptu web technology unit 2 htmluptu web technology unit 2 html
uptu web technology unit 2 html
 
uptu web technology unit 2 html
uptu web technology unit 2 htmluptu web technology unit 2 html
uptu web technology unit 2 html
 
uptu web technology unit 2 html
uptu web technology unit 2 htmluptu web technology unit 2 html
uptu web technology unit 2 html
 
uptu web technology unit 2 html
uptu web technology unit 2 htmluptu web technology unit 2 html
uptu web technology unit 2 html
 
uptu web technology unit 2 Css
uptu web technology unit 2 Cssuptu web technology unit 2 Css
uptu web technology unit 2 Css
 
uptu web technology unit 2 Css
uptu web technology unit 2 Cssuptu web technology unit 2 Css
uptu web technology unit 2 Css
 
Unit 1 web technology uptu slide
Unit 1 web technology uptu slideUnit 1 web technology uptu slide
Unit 1 web technology uptu slide
 
Unit1 Web Technology UPTU UNIT 1
Unit1 Web Technology UPTU UNIT 1 Unit1 Web Technology UPTU UNIT 1
Unit1 Web Technology UPTU UNIT 1
 
Unit1 2
Unit1 2 Unit1 2
Unit1 2
 
Web Technology UPTU UNIT 1
Web Technology UPTU UNIT 1 Web Technology UPTU UNIT 1
Web Technology UPTU UNIT 1
 
Mtech syllabus computer science uptu
Mtech syllabus computer science uptu Mtech syllabus computer science uptu
Mtech syllabus computer science uptu
 
Wi max tutorial
Wi max tutorialWi max tutorial
Wi max tutorial
 
Virtual lan
Virtual lanVirtual lan
Virtual lan
 
Virtual lan
Virtual lanVirtual lan
Virtual lan
 
Tcp traffic control and red ecn
Tcp traffic control and red ecnTcp traffic control and red ecn
Tcp traffic control and red ecn
 
Schedulling
SchedullingSchedulling
Schedulling
 
Scheduling
SchedulingScheduling
Scheduling
 
Rsa example
Rsa exampleRsa example
Rsa example
 
Routers and planes (1)
Routers and planes (1)Routers and planes (1)
Routers and planes (1)
 

Recently uploaded

Sectors of the Indian Economy - Class 10 Study Notes pdf
Sectors of the Indian Economy - Class 10 Study Notes pdfSectors of the Indian Economy - Class 10 Study Notes pdf
Sectors of the Indian Economy - Class 10 Study Notes pdf
Vivekanand Anglo Vedic Academy
 
Supporting (UKRI) OA monographs at Salford.pptx
Supporting (UKRI) OA monographs at Salford.pptxSupporting (UKRI) OA monographs at Salford.pptx
Supporting (UKRI) OA monographs at Salford.pptx
Jisc
 
2024.06.01 Introducing a competency framework for languag learning materials ...
2024.06.01 Introducing a competency framework for languag learning materials ...2024.06.01 Introducing a competency framework for languag learning materials ...
2024.06.01 Introducing a competency framework for languag learning materials ...
Sandy Millin
 
Chapter 3 - Islamic Banking Products and Services.pptx
Chapter 3 - Islamic Banking Products and Services.pptxChapter 3 - Islamic Banking Products and Services.pptx
Chapter 3 - Islamic Banking Products and Services.pptx
Mohd Adib Abd Muin, Senior Lecturer at Universiti Utara Malaysia
 
How to Create Map Views in the Odoo 17 ERP
How to Create Map Views in the Odoo 17 ERPHow to Create Map Views in the Odoo 17 ERP
How to Create Map Views in the Odoo 17 ERP
Celine George
 
The Roman Empire A Historical Colossus.pdf
The Roman Empire A Historical Colossus.pdfThe Roman Empire A Historical Colossus.pdf
The Roman Empire A Historical Colossus.pdf
kaushalkr1407
 
Template Jadual Bertugas Kelas (Boleh Edit)
Template Jadual Bertugas Kelas (Boleh Edit)Template Jadual Bertugas Kelas (Boleh Edit)
Template Jadual Bertugas Kelas (Boleh Edit)
rosedainty
 
ESC Beyond Borders _From EU to You_ InfoPack general.pdf
ESC Beyond Borders _From EU to You_ InfoPack general.pdfESC Beyond Borders _From EU to You_ InfoPack general.pdf
ESC Beyond Borders _From EU to You_ InfoPack general.pdf
Fundacja Rozwoju Społeczeństwa Przedsiębiorczego
 
Digital Tools and AI for Teaching Learning and Research
Digital Tools and AI for Teaching Learning and ResearchDigital Tools and AI for Teaching Learning and Research
Digital Tools and AI for Teaching Learning and Research
Vikramjit Singh
 
special B.ed 2nd year old paper_20240531.pdf
special B.ed 2nd year old paper_20240531.pdfspecial B.ed 2nd year old paper_20240531.pdf
special B.ed 2nd year old paper_20240531.pdf
Special education needs
 
Sha'Carri Richardson Presentation 202345
Sha'Carri Richardson Presentation 202345Sha'Carri Richardson Presentation 202345
Sha'Carri Richardson Presentation 202345
beazzy04
 
Synthetic Fiber Construction in lab .pptx
Synthetic Fiber Construction in lab .pptxSynthetic Fiber Construction in lab .pptx
Synthetic Fiber Construction in lab .pptx
Pavel ( NSTU)
 
Operation Blue Star - Saka Neela Tara
Operation Blue Star   -  Saka Neela TaraOperation Blue Star   -  Saka Neela Tara
Operation Blue Star - Saka Neela Tara
Balvir Singh
 
How to Make a Field invisible in Odoo 17
How to Make a Field invisible in Odoo 17How to Make a Field invisible in Odoo 17
How to Make a Field invisible in Odoo 17
Celine George
 
Basic phrases for greeting and assisting costumers
Basic phrases for greeting and assisting costumersBasic phrases for greeting and assisting costumers
Basic phrases for greeting and assisting costumers
PedroFerreira53928
 
PART A. Introduction to Costumer Service
PART A. Introduction to Costumer ServicePART A. Introduction to Costumer Service
PART A. Introduction to Costumer Service
PedroFerreira53928
 
Unit 2- Research Aptitude (UGC NET Paper I).pdf
Unit 2- Research Aptitude (UGC NET Paper I).pdfUnit 2- Research Aptitude (UGC NET Paper I).pdf
Unit 2- Research Aptitude (UGC NET Paper I).pdf
Thiyagu K
 
How libraries can support authors with open access requirements for UKRI fund...
How libraries can support authors with open access requirements for UKRI fund...How libraries can support authors with open access requirements for UKRI fund...
How libraries can support authors with open access requirements for UKRI fund...
Jisc
 
Additional Benefits for Employee Website.pdf
Additional Benefits for Employee Website.pdfAdditional Benefits for Employee Website.pdf
Additional Benefits for Employee Website.pdf
joachimlavalley1
 
Language Across the Curriculm LAC B.Ed.
Language Across the  Curriculm LAC B.Ed.Language Across the  Curriculm LAC B.Ed.
Language Across the Curriculm LAC B.Ed.
Atul Kumar Singh
 

Recently uploaded (20)

Sectors of the Indian Economy - Class 10 Study Notes pdf
Sectors of the Indian Economy - Class 10 Study Notes pdfSectors of the Indian Economy - Class 10 Study Notes pdf
Sectors of the Indian Economy - Class 10 Study Notes pdf
 
Supporting (UKRI) OA monographs at Salford.pptx
Supporting (UKRI) OA monographs at Salford.pptxSupporting (UKRI) OA monographs at Salford.pptx
Supporting (UKRI) OA monographs at Salford.pptx
 
2024.06.01 Introducing a competency framework for languag learning materials ...
2024.06.01 Introducing a competency framework for languag learning materials ...2024.06.01 Introducing a competency framework for languag learning materials ...
2024.06.01 Introducing a competency framework for languag learning materials ...
 
Chapter 3 - Islamic Banking Products and Services.pptx
Chapter 3 - Islamic Banking Products and Services.pptxChapter 3 - Islamic Banking Products and Services.pptx
Chapter 3 - Islamic Banking Products and Services.pptx
 
How to Create Map Views in the Odoo 17 ERP
How to Create Map Views in the Odoo 17 ERPHow to Create Map Views in the Odoo 17 ERP
How to Create Map Views in the Odoo 17 ERP
 
The Roman Empire A Historical Colossus.pdf
The Roman Empire A Historical Colossus.pdfThe Roman Empire A Historical Colossus.pdf
The Roman Empire A Historical Colossus.pdf
 
Template Jadual Bertugas Kelas (Boleh Edit)
Template Jadual Bertugas Kelas (Boleh Edit)Template Jadual Bertugas Kelas (Boleh Edit)
Template Jadual Bertugas Kelas (Boleh Edit)
 
ESC Beyond Borders _From EU to You_ InfoPack general.pdf
ESC Beyond Borders _From EU to You_ InfoPack general.pdfESC Beyond Borders _From EU to You_ InfoPack general.pdf
ESC Beyond Borders _From EU to You_ InfoPack general.pdf
 
Digital Tools and AI for Teaching Learning and Research
Digital Tools and AI for Teaching Learning and ResearchDigital Tools and AI for Teaching Learning and Research
Digital Tools and AI for Teaching Learning and Research
 
special B.ed 2nd year old paper_20240531.pdf
special B.ed 2nd year old paper_20240531.pdfspecial B.ed 2nd year old paper_20240531.pdf
special B.ed 2nd year old paper_20240531.pdf
 
Sha'Carri Richardson Presentation 202345
Sha'Carri Richardson Presentation 202345Sha'Carri Richardson Presentation 202345
Sha'Carri Richardson Presentation 202345
 
Synthetic Fiber Construction in lab .pptx
Synthetic Fiber Construction in lab .pptxSynthetic Fiber Construction in lab .pptx
Synthetic Fiber Construction in lab .pptx
 
Operation Blue Star - Saka Neela Tara
Operation Blue Star   -  Saka Neela TaraOperation Blue Star   -  Saka Neela Tara
Operation Blue Star - Saka Neela Tara
 
How to Make a Field invisible in Odoo 17
How to Make a Field invisible in Odoo 17How to Make a Field invisible in Odoo 17
How to Make a Field invisible in Odoo 17
 
Basic phrases for greeting and assisting costumers
Basic phrases for greeting and assisting costumersBasic phrases for greeting and assisting costumers
Basic phrases for greeting and assisting costumers
 
PART A. Introduction to Costumer Service
PART A. Introduction to Costumer ServicePART A. Introduction to Costumer Service
PART A. Introduction to Costumer Service
 
Unit 2- Research Aptitude (UGC NET Paper I).pdf
Unit 2- Research Aptitude (UGC NET Paper I).pdfUnit 2- Research Aptitude (UGC NET Paper I).pdf
Unit 2- Research Aptitude (UGC NET Paper I).pdf
 
How libraries can support authors with open access requirements for UKRI fund...
How libraries can support authors with open access requirements for UKRI fund...How libraries can support authors with open access requirements for UKRI fund...
How libraries can support authors with open access requirements for UKRI fund...
 
Additional Benefits for Employee Website.pdf
Additional Benefits for Employee Website.pdfAdditional Benefits for Employee Website.pdf
Additional Benefits for Employee Website.pdf
 
Language Across the Curriculm LAC B.Ed.
Language Across the  Curriculm LAC B.Ed.Language Across the  Curriculm LAC B.Ed.
Language Across the Curriculm LAC B.Ed.
 

uptu web technology unit 2 Xml2

  • 1. Web Technology (NCS-504) Prepared By Mr.Abhishek Kesharwani Assistant Professor,UCER Naini,Allahabad
  • 3. XML DOM  The XML DOM defines a standard for accessing and manipulating XML. The DOM is a W3C (World Wide Web Consortium) standard. The DOM defines a standard for accessing documents like XML and HTML: The W3C Document Object Model (DOM) is a platform and language-neutral interface that allows programs and scripts to dynamically access and update the content, structure, and style of a document. 3
  • 4. 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 4
  • 5. What is the XML DOM? 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. 5
  • 6. XML SAX SAX (Simple API for XML) is an event- based sequential access parser API developed by the XML-DEV mailing list for XMLdocuments. SAX provides a mechanism for reading data from an XML document that is an alternative to that provided by the Document Object Model (DOM). SAX parsers operate on each piece of the XML document sequentially. 6
  • 7. Benefits SAX parsers have some benefits over DOM-style parsers.  A SAX parser only needs to report each parsing event as it happens, and normally discards almost all of that information once reported Thus, the minimum memory required for a SAX parser is proportional to the maximum depth of the XML file (i.e., of the XML tree) and the maximum data involved in a single.  XML event (such as the name and attributes of a single start- tag, or the content of a processing instruction, etc.) 7
  • 8. Drawbacks The event-driven model of SAX is useful for XML parsing, but it does have certain drawbacks. Virtually any kind of XML validation requires access to the document in full. The most trivial example is that an attribute declared in the DTD to be of type IDREF, requires that there be an element in the document that uses the same value for an ID attribute. To validate this in a SAX parser, one must keep track of all ID attributes (any one of them might end up being referenced by an IDREF attribute at the very end); as well as every IDREF attribute until it is resolved. 8