SlideShare une entreprise Scribd logo
1  sur  28
Télécharger pour lire hors ligne
WEB TECHNOLOGIES XML
Dr R Jegadeesan Prof-CSE
Jyothishmathi Institute of Technology and Science,
karimnagar
Syllabus
XML
Introduction to XML, Defining XML
tags, their attributes and values,
Document Type Definition, XML
Schemas, Document Object Model,
XHTML Parsing XML Data - DOM and
SAX Parsers in java.
2
UNIT - II : XML
Aim & Objective :
➢ To introduce XML and processing of XML Data.
➢ XML is widely used in the era of web development. It is also used to
simplify data storage and data sharing.
Features & Advantages of XML
3
UNIT - II : XML
Main Features of XML :
The main features or advantages of XML are
1) XML separates data from HTML
➢ If you need to display dynamic data in your HTML document, it will take a lot of work to edit the
HTML each time the data changes.
➢ With XML, data can be stored in separate XML files. This way you can focus on using HTML/CSS
for display and layout, and be sure that changes in the underlying data will not require any
changes to the HTML.
➢ With a few lines of JavaScript code, you can read an external XML file and update the data
content of your web page.
Features & Advantages of XML
4
UNIT - II : XML
2) XML simplifies data sharing
➢ In the real world, computer systems and databases contain data in incompatible formats.
➢ XML data is stored in plain text format. This provides a software- and hardware-independent
way of storing data.
➢ This makes it much easier to create data that can be shared by different applications.
3) XML simplifies data transport
➢ One of the most time-consuming challenges for developers is to exchange data between
incompatible systems over the Internet.
➢ Exchanging data as XML greatly reduces this complexity, since the data can be read by
different incompatible applications.
Features & Advantages of XML
5
UNIT - II : XML
4) XML simplifies Platform change
➢ Upgrading to new systems (hardware or software platforms), is always time consuming. Large
amounts of data must be converted and incompatible data is often lost.
➢ XML data is stored in text format. This makes it easier to expand or upgrade to new operating
systems, new applications, or new browsers, without losing data.
5) XML increases data availability
➢ Different applications can access your data, not only in HTML pages, but also from XML data
sources.
➢ With XML, your data can be available to all kinds of "reading machines" (Handheld computers,
voice machines, news feeds, etc), and make it more available for blind people, or people with
other disabilities.
Features & Advantages of XML
6
UNIT - II : XML
XML Documents Must Have a Root Element
XML documents must contain one root element that is the parent of all other elements:
<root>
<child>
<subchild>.....</subchild>
</child>
</root>
In this example <note> is the root element:
<?xml version="1.0" encoding="UTF-8"?>
<note>
<to>Varun</to>
<from>Joel</from>
<heading>Happy message</heading>
<body>Don't forget me this weekend!</body>
</note>
Features & Advantages of XML
7
UNIT - II : XML
The XML Prolog
➢ This line is called the XML prolog:
<?xml version="1.0" encoding="UTF-8"?>
➢ The XML prolog is optional. If it exists, it must come first in the document.
➢ To avoid errors, you should specify the encoding used, or save your XML files as UTF-8.
➢ UTF-8 is the default character encoding for XML documents.
➢ UTF-8 is also the default encoding for HTML5, CSS, JavaScript, PHP, and SQL.
Features & Advantages of XML
8
UNIT - II : XML
All XML Elements Must Have a Closing Tag
➢ In XML, it is illegal to omit the closing tag. All elements must have a closing tag:
<p>This is a paragraph.</p>
<br />
Note: The XML prolog does not have a closing tag! This is not an error. The prolog is not a part of
the XML document.
XML Tags are Case Sensitive
XML tags are case sensitive. The tag <Letter> is different from the tag <letter>.
Opening and closing tags must be written with the same case:
<message>This is correct</message>
Features & Advantages of XML
9
UNIT - II : XML
XML Elements Must be Properly Nested
➢ In HTML, you might see improperly nested elements:
➢ <b><i>This text is bold and italic</b></i>
➢ In XML, all elements must be properly nested within each other:
➢ <b><i>This text is bold and italic</i></b>
➢ In the example above, "Properly nested" simply means that since the <i> element is
opened inside the <b> element, it must be closed inside the <b> element.
Features & Advantages of XML
10
UNIT - II : XML
XML Attribute Values Must Always be Quoted
➢ XML elements can have attributes in name/value pairs just like in HTML.
➢ In XML, the attribute values must always be quoted:
➢ <note date="12/11/2007">
<to>Varun</to>
<from>Joel</from>
</note>
Features & Advantages of XML
11
UNIT - II : XML
Entity References
➢ Some characters have a special meaning in XML.
➢ If you place a character like "<" inside an XML element, it will generate an error because
the parser interprets it as the start of a new element.
➢ This will generate an XML error:
<message>salary < 1000</message>
➢ To avoid this error, replace the "<" character with an entity reference:
➢ <message>salary &lt; 1000</message>
There are 5 pre-defined entity references in XML:
➢ &lt; < less than
➢ &gt; > greater than
➢ &amp; & ampersand
➢ &apos; ‘ apostrophe
➢ &quot; “ quotation mark
➢Only < and & are strictly illegal in XML, but it is a good habit to replace > with &gt; as well.
Features & Advantages of XML
12
UNIT - II : XML
Example XML Program
<?xml version="1.0"?>
<bio-data>
<name> Varun</name>
<address>Tamilnadu</address>
</bio-data>
Note: the XML files can be saved with .xml extension
Features & Advantages of XML
13
UNIT - II : XML
Well Formed XML
XML documents that conform to the syntax rules above are said to be "Well Formed" XML
documents.
XML Naming Rules
XML elements must follow these naming rules:
Element names are case-sensitive
Element names must start with a letter or underscore
Element names cannot start with the letters xml (or XML, or Xml, etc)
Element names can contain letters, digits, hyphens, underscores, and periods
Element names cannot contain spaces Any name can be used, no words are reserved (except
xml).
Rules of XML
14
UNIT - II : XML
➢ XML elements can have attributes, just like HTML.
➢ Attributes are designed to contain data related to a specific element.
XML Attributes Must be Quoted
➢ Attribute values must always be quoted. Either single or double quotes can be used.
➢ For a person's gender, the <person> element can be written like this:
<person gender="female">
or like this:
<person gender='female'>
➢ If the attribute value itself contains double quotes you can use single quotes, like in this
example:
<gangster name=‘Welcome to “JITS" Campus'>
➢ or you can use character entities:
<gangster name=“Welcome &quot; JITS&quot; Campus">
XML Attributes
15
UNIT - II : XML
Usage of XML
16
UNIT - II : XML
Usage of XML
17
UNIT - II : XML
Example of XML
18
UNIT - II : XML
XML Tags & Attributes
19
UNIT - II : XML
XML Elements
20
UNIT II: XML
Features & Advantages of XML
21
Book Details :
TEXT BOOKS:
1. Web Technologies, Uttam K Roy, Oxford University Press
2. The Complete Reference PHP – Steven Holzner, Tata McGraw-Hill
REFERENCE BOOKS:
1.Web Programming, building internet applications, Chris Bates 2nd edition, Wiley Dreamtech
2. Java Server Pages –Hans Bergsten, SPD O’Reilly
3. Java Script, D. Flanagan, O’Reilly,SPD.
4. Beginning Web Programming-Jon Duckett WROX.
5. Programming World Wide Web, R. W. Sebesta, Fourth Edition, Pearson.
6. Internet and World Wide Web – How to program, Dietel and Nieto, Pearson.
UNIT II : XML
Features & Advantages of XML
22
Video Link details (NPTEL, YOUTUBE Lectures and etc.)
➢https://nptel.ac.in/content/storage2/nptel_ data3/html/mhrd/ict/text/106106093/lec39.pdf
➢http://www.nptelvideos.in/2012/11/internet-technologies.html
➢https://www.btechguru.com/training--programming--xml--xml-attributes--xml-attributes-
part2-video-lecture--11783--24--147.html
UNIT II : XML
Features & Advantages of XML
23
courses available on <www.coursera.org>, and http://neat.aicte-india.org
https://www.coursera.org/
Course 1 : Web Applications for Everybody Specialization
Build dynamic database-backed web sites.. Use PHP, MySQL, jQuery, and Handlebars to build web
and database applications.
Course 2: Web Design for Everybody: Basics of Web Development & Coding Specialization
Learn to Design and Create Websites. Build a responsive and accessible web portfolio using
HTML5, XML, CSS3, and JavaScript
UNIT II : XML
XML Tutorials
24
Tutorial topic wise
➢https://www.w3schools.com/xml/
➢https://www.tutorialspoint.com/xml/index.html
➢https://beginnersbook.com/2018/10/xml-tutorial-learn-xml/
➢http://www.xmlmaster.org/en/article/d01/
UNIT II : XML
XML MCQs
25
XML – MCQs
1.XML stands for ______________.
a) None of these b) Extensible Markup Language
C)Extensible Mashup Language d)Extended Mashup Language
2.XML is designed to ______________ and store data.
a)transport b)None of these
c)design d)verify
3.XML is much more similar like ______________.
a)C Programming b)CSS
c)JavaScript d)HTML
4.Which of the following is not a function of XML?
a)Store Information b)Transport Information.
c)Structure Information d)Style Information
5.XML deals with storage and ______________transport of data.
a)Transport b)Design
c)Minify d)Filter
UNIT II : XML
XML Tutorial Problems
26
XML –Tutorial Problems:
1.Write a XML to populate data to web pages
2.Write a php program to extract data from XML
UNIT II : XML
XML Questions
27
XML –universities & Important Questions:
1. Explain and show how XML is useful in defining data for web applications.
2. Explain the various terms related to Document Type Definition.
3. Design an XML schema for hospital information management. Include every feature
available with schema.
4. Explain how styling XML with cascading style sheets is done for the library information
domain.
5. List and Explain the important features of XML which make it more suitable than HTML for
creating web related services.
6. Define an xml scheme to show how an XML Scheme can be created
7. Define Attributes in XML .Also different types of attributes.
8. List the elements in XML .Also different types of content of Elements.
9. How do you define the elements of an XML document in an XML Schema?
10. How do you set default and fixed values for simple Elements?
Thank you
28

Contenu connexe

Tendances

Xml data transformation
Xml data transformationXml data transformation
Xml data transformation
Raghu nath
 
Xml Presentation-3
Xml Presentation-3Xml Presentation-3
Xml Presentation-3
Sudharsan S
 

Tendances (18)

Xml and xml processor
Xml and xml processorXml and xml processor
Xml and xml processor
 
XML
XMLXML
XML
 
Xml theory 2005_[ngohaianh.info]_1_introduction-to-xml
Xml theory 2005_[ngohaianh.info]_1_introduction-to-xmlXml theory 2005_[ngohaianh.info]_1_introduction-to-xml
Xml theory 2005_[ngohaianh.info]_1_introduction-to-xml
 
XML
XMLXML
XML
 
XML
XMLXML
XML
 
XML Introduction
XML IntroductionXML Introduction
XML Introduction
 
Xml ppt
Xml pptXml ppt
Xml ppt
 
Xml
XmlXml
Xml
 
PHP XML
PHP XMLPHP XML
PHP XML
 
Xml data transformation
Xml data transformationXml data transformation
Xml data transformation
 
uptu web technology unit 2 Xml2
uptu web technology unit 2 Xml2uptu web technology unit 2 Xml2
uptu web technology unit 2 Xml2
 
Xml Presentation-3
Xml Presentation-3Xml Presentation-3
Xml Presentation-3
 
XML | Computer Science
XML | Computer ScienceXML | Computer Science
XML | Computer Science
 
Introduction to XML
Introduction to XMLIntroduction to XML
Introduction to XML
 
Xml 215-presentation
Xml 215-presentationXml 215-presentation
Xml 215-presentation
 
Xml intro1
Xml intro1Xml intro1
Xml intro1
 
Introduction to xml
Introduction to xmlIntroduction to xml
Introduction to xml
 
Xml
XmlXml
Xml
 

Similaire à WEB TECHNOLOGIES XML

Introduction to xml
Introduction to xmlIntroduction to xml
Introduction to xml
soumya
 

Similaire à WEB TECHNOLOGIES XML (20)

paper about xml
paper about xmlpaper about xml
paper about xml
 
XML notes.pptx
XML notes.pptxXML notes.pptx
XML notes.pptx
 
XML1.pptx
XML1.pptxXML1.pptx
XML1.pptx
 
M.FLORENCE DAYANA WEB DESIGN -Unit 5 XML
M.FLORENCE DAYANA WEB DESIGN -Unit 5   XMLM.FLORENCE DAYANA WEB DESIGN -Unit 5   XML
M.FLORENCE DAYANA WEB DESIGN -Unit 5 XML
 
Unit 2.2
Unit 2.2Unit 2.2
Unit 2.2
 
Module 5 XML Notes.pdf
Module 5 XML Notes.pdfModule 5 XML Notes.pdf
Module 5 XML Notes.pdf
 
XML
XMLXML
XML
 
Unit 2.2
Unit 2.2Unit 2.2
Unit 2.2
 
CrashCourse: XML technologies
CrashCourse: XML technologiesCrashCourse: XML technologies
CrashCourse: XML technologies
 
Xml 150323102007-conversion-gate01
Xml 150323102007-conversion-gate01Xml 150323102007-conversion-gate01
Xml 150323102007-conversion-gate01
 
00 introduction
00 introduction00 introduction
00 introduction
 
Wp unit III
Wp unit IIIWp unit III
Wp unit III
 
Introduction to xml
Introduction to xmlIntroduction to xml
Introduction to xml
 
Xml material
Xml materialXml material
Xml material
 
Xml material
Xml materialXml material
Xml material
 
Xml material
Xml materialXml material
Xml material
 
CTDA Workshop on XML and MODS
CTDA Workshop on XML and MODSCTDA Workshop on XML and MODS
CTDA Workshop on XML and MODS
 
Unit 5 xml (1)
Unit 5   xml (1)Unit 5   xml (1)
Unit 5 xml (1)
 
XML-INTRODUCTION.pdf
XML-INTRODUCTION.pdfXML-INTRODUCTION.pdf
XML-INTRODUCTION.pdf
 
XML - Extensible Markup Language for Network Security.pptx
XML - Extensible Markup Language for Network Security.pptxXML - Extensible Markup Language for Network Security.pptx
XML - Extensible Markup Language for Network Security.pptx
 

Plus de Jyothishmathi Institute of Technology and Science Karimnagar

Plus de Jyothishmathi Institute of Technology and Science Karimnagar (20)

JAVA PROGRAMMING- GUI Programming with Swing - The Swing Buttons
JAVA PROGRAMMING- GUI Programming with Swing - The Swing ButtonsJAVA PROGRAMMING- GUI Programming with Swing - The Swing Buttons
JAVA PROGRAMMING- GUI Programming with Swing - The Swing Buttons
 
JAVA PROGRAMMING - The Collections Framework
JAVA PROGRAMMING - The Collections Framework JAVA PROGRAMMING - The Collections Framework
JAVA PROGRAMMING - The Collections Framework
 
JAVA PROGRAMMING- Exception handling - Multithreading
JAVA PROGRAMMING- Exception handling - MultithreadingJAVA PROGRAMMING- Exception handling - Multithreading
JAVA PROGRAMMING- Exception handling - Multithreading
 
JAVA PROGRAMMING – Packages - Stream based I/O
JAVA PROGRAMMING – Packages - Stream based I/O JAVA PROGRAMMING – Packages - Stream based I/O
JAVA PROGRAMMING – Packages - Stream based I/O
 
Java programming -Object-Oriented Thinking- Inheritance
Java programming -Object-Oriented Thinking- InheritanceJava programming -Object-Oriented Thinking- Inheritance
Java programming -Object-Oriented Thinking- Inheritance
 
WEB TECHNOLOGIES JavaScript
WEB TECHNOLOGIES JavaScriptWEB TECHNOLOGIES JavaScript
WEB TECHNOLOGIES JavaScript
 
WEB TECHNOLOGIES JSP
WEB TECHNOLOGIES  JSPWEB TECHNOLOGIES  JSP
WEB TECHNOLOGIES JSP
 
WEB TECHNOLOGIES Servlet
WEB TECHNOLOGIES ServletWEB TECHNOLOGIES Servlet
WEB TECHNOLOGIES Servlet
 
WEB TECHNOLOGIES- PHP Programming
WEB TECHNOLOGIES-  PHP ProgrammingWEB TECHNOLOGIES-  PHP Programming
WEB TECHNOLOGIES- PHP Programming
 
Compiler Design- Machine Independent Optimizations
Compiler Design- Machine Independent OptimizationsCompiler Design- Machine Independent Optimizations
Compiler Design- Machine Independent Optimizations
 
COMPILER DESIGN Run-Time Environments
COMPILER DESIGN Run-Time EnvironmentsCOMPILER DESIGN Run-Time Environments
COMPILER DESIGN Run-Time Environments
 
COMPILER DESIGN- Syntax Directed Translation
COMPILER DESIGN- Syntax Directed TranslationCOMPILER DESIGN- Syntax Directed Translation
COMPILER DESIGN- Syntax Directed Translation
 
COMPILER DESIGN- Syntax Analysis
COMPILER DESIGN- Syntax AnalysisCOMPILER DESIGN- Syntax Analysis
COMPILER DESIGN- Syntax Analysis
 
COMPILER DESIGN- Introduction & Lexical Analysis:
COMPILER DESIGN- Introduction & Lexical Analysis: COMPILER DESIGN- Introduction & Lexical Analysis:
COMPILER DESIGN- Introduction & Lexical Analysis:
 
CRYPTOGRAPHY AND NETWORK SECURITY- E-Mail Security
CRYPTOGRAPHY AND NETWORK SECURITY- E-Mail SecurityCRYPTOGRAPHY AND NETWORK SECURITY- E-Mail Security
CRYPTOGRAPHY AND NETWORK SECURITY- E-Mail Security
 
CRYPTOGRAPHY AND NETWORK SECURITY- Transport-level Security
CRYPTOGRAPHY AND NETWORK SECURITY- Transport-level SecurityCRYPTOGRAPHY AND NETWORK SECURITY- Transport-level Security
CRYPTOGRAPHY AND NETWORK SECURITY- Transport-level Security
 
CRYPTOGRAPHY & NETWORK SECURITY- Cryptographic Hash Functions
CRYPTOGRAPHY & NETWORK SECURITY- Cryptographic Hash FunctionsCRYPTOGRAPHY & NETWORK SECURITY- Cryptographic Hash Functions
CRYPTOGRAPHY & NETWORK SECURITY- Cryptographic Hash Functions
 
CRYPTOGRAPHY & NETWOK SECURITY- Symmetric key Ciphers
CRYPTOGRAPHY & NETWOK SECURITY- Symmetric key CiphersCRYPTOGRAPHY & NETWOK SECURITY- Symmetric key Ciphers
CRYPTOGRAPHY & NETWOK SECURITY- Symmetric key Ciphers
 
CRYPTOGRAPHY & NETWORK SECURITY
CRYPTOGRAPHY & NETWORK SECURITYCRYPTOGRAPHY & NETWORK SECURITY
CRYPTOGRAPHY & NETWORK SECURITY
 
Computer Forensics Working with Windows and DOS Systems
Computer Forensics Working with Windows and DOS SystemsComputer Forensics Working with Windows and DOS Systems
Computer Forensics Working with Windows and DOS Systems
 

Dernier

EIS-Webinar-Prompt-Knowledge-Eng-2024-04-08.pptx
EIS-Webinar-Prompt-Knowledge-Eng-2024-04-08.pptxEIS-Webinar-Prompt-Knowledge-Eng-2024-04-08.pptx
EIS-Webinar-Prompt-Knowledge-Eng-2024-04-08.pptx
Earley Information Science
 
IAC 2024 - IA Fast Track to Search Focused AI Solutions
IAC 2024 - IA Fast Track to Search Focused AI SolutionsIAC 2024 - IA Fast Track to Search Focused AI Solutions
IAC 2024 - IA Fast Track to Search Focused AI Solutions
Enterprise Knowledge
 

Dernier (20)

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
 
08448380779 Call Girls In Friends Colony Women Seeking Men
08448380779 Call Girls In Friends Colony Women Seeking Men08448380779 Call Girls In Friends Colony Women Seeking Men
08448380779 Call Girls In Friends Colony Women Seeking Men
 
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...
 
Strategies for Unlocking Knowledge Management in Microsoft 365 in the Copilot...
Strategies for Unlocking Knowledge Management in Microsoft 365 in the Copilot...Strategies for Unlocking Knowledge Management in Microsoft 365 in the Copilot...
Strategies for Unlocking Knowledge Management in Microsoft 365 in the Copilot...
 
Slack Application Development 101 Slides
Slack Application Development 101 SlidesSlack Application Development 101 Slides
Slack Application Development 101 Slides
 
From Event to Action: Accelerate Your Decision Making with Real-Time Automation
From Event to Action: Accelerate Your Decision Making with Real-Time AutomationFrom Event to Action: Accelerate Your Decision Making with Real-Time Automation
From Event to Action: Accelerate Your Decision Making with Real-Time Automation
 
Scaling API-first – The story of a global engineering organization
Scaling API-first – The story of a global engineering organizationScaling API-first – The story of a global engineering organization
Scaling API-first – The story of a global engineering organization
 
The Codex of Business Writing Software for Real-World Solutions 2.pptx
The Codex of Business Writing Software for Real-World Solutions 2.pptxThe Codex of Business Writing Software for Real-World Solutions 2.pptx
The Codex of Business Writing Software for Real-World Solutions 2.pptx
 
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
 
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
 
🐬 The future of MySQL is Postgres 🐘
🐬  The future of MySQL is Postgres   🐘🐬  The future of MySQL is Postgres   🐘
🐬 The future of MySQL is Postgres 🐘
 
A Call to Action for Generative AI in 2024
A Call to Action for Generative AI in 2024A Call to Action for Generative AI in 2024
A Call to Action for Generative AI in 2024
 
EIS-Webinar-Prompt-Knowledge-Eng-2024-04-08.pptx
EIS-Webinar-Prompt-Knowledge-Eng-2024-04-08.pptxEIS-Webinar-Prompt-Knowledge-Eng-2024-04-08.pptx
EIS-Webinar-Prompt-Knowledge-Eng-2024-04-08.pptx
 
Presentation on how to chat with PDF using ChatGPT code interpreter
Presentation on how to chat with PDF using ChatGPT code interpreterPresentation on how to chat with PDF using ChatGPT code interpreter
Presentation on how to chat with PDF using ChatGPT code interpreter
 
The Role of Taxonomy and Ontology in Semantic Layers - Heather Hedden.pdf
The Role of Taxonomy and Ontology in Semantic Layers - Heather Hedden.pdfThe Role of Taxonomy and Ontology in Semantic Layers - Heather Hedden.pdf
The Role of Taxonomy and Ontology in Semantic Layers - Heather Hedden.pdf
 
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
 
Advantages of Hiring UIUX Design Service Providers for Your Business
Advantages of Hiring UIUX Design Service Providers for Your BusinessAdvantages of Hiring UIUX Design Service Providers for Your Business
Advantages of Hiring UIUX Design Service Providers for Your Business
 
IAC 2024 - IA Fast Track to Search Focused AI Solutions
IAC 2024 - IA Fast Track to Search Focused AI SolutionsIAC 2024 - IA Fast Track to Search Focused AI Solutions
IAC 2024 - IA Fast Track to Search Focused AI Solutions
 
04-2024-HHUG-Sales-and-Marketing-Alignment.pptx
04-2024-HHUG-Sales-and-Marketing-Alignment.pptx04-2024-HHUG-Sales-and-Marketing-Alignment.pptx
04-2024-HHUG-Sales-and-Marketing-Alignment.pptx
 
How to Troubleshoot Apps for the Modern Connected Worker
How to Troubleshoot Apps for the Modern Connected WorkerHow to Troubleshoot Apps for the Modern Connected Worker
How to Troubleshoot Apps for the Modern Connected Worker
 

WEB TECHNOLOGIES XML

  • 1. WEB TECHNOLOGIES XML Dr R Jegadeesan Prof-CSE Jyothishmathi Institute of Technology and Science, karimnagar
  • 2. Syllabus XML Introduction to XML, Defining XML tags, their attributes and values, Document Type Definition, XML Schemas, Document Object Model, XHTML Parsing XML Data - DOM and SAX Parsers in java. 2
  • 3. UNIT - II : XML Aim & Objective : ➢ To introduce XML and processing of XML Data. ➢ XML is widely used in the era of web development. It is also used to simplify data storage and data sharing. Features & Advantages of XML 3
  • 4. UNIT - II : XML Main Features of XML : The main features or advantages of XML are 1) XML separates data from HTML ➢ If you need to display dynamic data in your HTML document, it will take a lot of work to edit the HTML each time the data changes. ➢ With XML, data can be stored in separate XML files. This way you can focus on using HTML/CSS for display and layout, and be sure that changes in the underlying data will not require any changes to the HTML. ➢ With a few lines of JavaScript code, you can read an external XML file and update the data content of your web page. Features & Advantages of XML 4
  • 5. UNIT - II : XML 2) XML simplifies data sharing ➢ In the real world, computer systems and databases contain data in incompatible formats. ➢ XML data is stored in plain text format. This provides a software- and hardware-independent way of storing data. ➢ This makes it much easier to create data that can be shared by different applications. 3) XML simplifies data transport ➢ One of the most time-consuming challenges for developers is to exchange data between incompatible systems over the Internet. ➢ Exchanging data as XML greatly reduces this complexity, since the data can be read by different incompatible applications. Features & Advantages of XML 5
  • 6. UNIT - II : XML 4) XML simplifies Platform change ➢ Upgrading to new systems (hardware or software platforms), is always time consuming. Large amounts of data must be converted and incompatible data is often lost. ➢ XML data is stored in text format. This makes it easier to expand or upgrade to new operating systems, new applications, or new browsers, without losing data. 5) XML increases data availability ➢ Different applications can access your data, not only in HTML pages, but also from XML data sources. ➢ With XML, your data can be available to all kinds of "reading machines" (Handheld computers, voice machines, news feeds, etc), and make it more available for blind people, or people with other disabilities. Features & Advantages of XML 6
  • 7. UNIT - II : XML XML Documents Must Have a Root Element XML documents must contain one root element that is the parent of all other elements: <root> <child> <subchild>.....</subchild> </child> </root> In this example <note> is the root element: <?xml version="1.0" encoding="UTF-8"?> <note> <to>Varun</to> <from>Joel</from> <heading>Happy message</heading> <body>Don't forget me this weekend!</body> </note> Features & Advantages of XML 7
  • 8. UNIT - II : XML The XML Prolog ➢ This line is called the XML prolog: <?xml version="1.0" encoding="UTF-8"?> ➢ The XML prolog is optional. If it exists, it must come first in the document. ➢ To avoid errors, you should specify the encoding used, or save your XML files as UTF-8. ➢ UTF-8 is the default character encoding for XML documents. ➢ UTF-8 is also the default encoding for HTML5, CSS, JavaScript, PHP, and SQL. Features & Advantages of XML 8
  • 9. UNIT - II : XML All XML Elements Must Have a Closing Tag ➢ In XML, it is illegal to omit the closing tag. All elements must have a closing tag: <p>This is a paragraph.</p> <br /> Note: The XML prolog does not have a closing tag! This is not an error. The prolog is not a part of the XML document. XML Tags are Case Sensitive XML tags are case sensitive. The tag <Letter> is different from the tag <letter>. Opening and closing tags must be written with the same case: <message>This is correct</message> Features & Advantages of XML 9
  • 10. UNIT - II : XML XML Elements Must be Properly Nested ➢ In HTML, you might see improperly nested elements: ➢ <b><i>This text is bold and italic</b></i> ➢ In XML, all elements must be properly nested within each other: ➢ <b><i>This text is bold and italic</i></b> ➢ In the example above, "Properly nested" simply means that since the <i> element is opened inside the <b> element, it must be closed inside the <b> element. Features & Advantages of XML 10
  • 11. UNIT - II : XML XML Attribute Values Must Always be Quoted ➢ XML elements can have attributes in name/value pairs just like in HTML. ➢ In XML, the attribute values must always be quoted: ➢ <note date="12/11/2007"> <to>Varun</to> <from>Joel</from> </note> Features & Advantages of XML 11
  • 12. UNIT - II : XML Entity References ➢ Some characters have a special meaning in XML. ➢ If you place a character like "<" inside an XML element, it will generate an error because the parser interprets it as the start of a new element. ➢ This will generate an XML error: <message>salary < 1000</message> ➢ To avoid this error, replace the "<" character with an entity reference: ➢ <message>salary &lt; 1000</message> There are 5 pre-defined entity references in XML: ➢ &lt; < less than ➢ &gt; > greater than ➢ &amp; & ampersand ➢ &apos; ‘ apostrophe ➢ &quot; “ quotation mark ➢Only < and & are strictly illegal in XML, but it is a good habit to replace > with &gt; as well. Features & Advantages of XML 12
  • 13. UNIT - II : XML Example XML Program <?xml version="1.0"?> <bio-data> <name> Varun</name> <address>Tamilnadu</address> </bio-data> Note: the XML files can be saved with .xml extension Features & Advantages of XML 13
  • 14. UNIT - II : XML Well Formed XML XML documents that conform to the syntax rules above are said to be "Well Formed" XML documents. XML Naming Rules XML elements must follow these naming rules: Element names are case-sensitive Element names must start with a letter or underscore Element names cannot start with the letters xml (or XML, or Xml, etc) Element names can contain letters, digits, hyphens, underscores, and periods Element names cannot contain spaces Any name can be used, no words are reserved (except xml). Rules of XML 14
  • 15. UNIT - II : XML ➢ XML elements can have attributes, just like HTML. ➢ Attributes are designed to contain data related to a specific element. XML Attributes Must be Quoted ➢ Attribute values must always be quoted. Either single or double quotes can be used. ➢ For a person's gender, the <person> element can be written like this: <person gender="female"> or like this: <person gender='female'> ➢ If the attribute value itself contains double quotes you can use single quotes, like in this example: <gangster name=‘Welcome to “JITS" Campus'> ➢ or you can use character entities: <gangster name=“Welcome &quot; JITS&quot; Campus"> XML Attributes 15
  • 16. UNIT - II : XML Usage of XML 16
  • 17. UNIT - II : XML Usage of XML 17
  • 18. UNIT - II : XML Example of XML 18
  • 19. UNIT - II : XML XML Tags & Attributes 19
  • 20. UNIT - II : XML XML Elements 20
  • 21. UNIT II: XML Features & Advantages of XML 21 Book Details : TEXT BOOKS: 1. Web Technologies, Uttam K Roy, Oxford University Press 2. The Complete Reference PHP – Steven Holzner, Tata McGraw-Hill REFERENCE BOOKS: 1.Web Programming, building internet applications, Chris Bates 2nd edition, Wiley Dreamtech 2. Java Server Pages –Hans Bergsten, SPD O’Reilly 3. Java Script, D. Flanagan, O’Reilly,SPD. 4. Beginning Web Programming-Jon Duckett WROX. 5. Programming World Wide Web, R. W. Sebesta, Fourth Edition, Pearson. 6. Internet and World Wide Web – How to program, Dietel and Nieto, Pearson.
  • 22. UNIT II : XML Features & Advantages of XML 22 Video Link details (NPTEL, YOUTUBE Lectures and etc.) ➢https://nptel.ac.in/content/storage2/nptel_ data3/html/mhrd/ict/text/106106093/lec39.pdf ➢http://www.nptelvideos.in/2012/11/internet-technologies.html ➢https://www.btechguru.com/training--programming--xml--xml-attributes--xml-attributes- part2-video-lecture--11783--24--147.html
  • 23. UNIT II : XML Features & Advantages of XML 23 courses available on <www.coursera.org>, and http://neat.aicte-india.org https://www.coursera.org/ Course 1 : Web Applications for Everybody Specialization Build dynamic database-backed web sites.. Use PHP, MySQL, jQuery, and Handlebars to build web and database applications. Course 2: Web Design for Everybody: Basics of Web Development & Coding Specialization Learn to Design and Create Websites. Build a responsive and accessible web portfolio using HTML5, XML, CSS3, and JavaScript
  • 24. UNIT II : XML XML Tutorials 24 Tutorial topic wise ➢https://www.w3schools.com/xml/ ➢https://www.tutorialspoint.com/xml/index.html ➢https://beginnersbook.com/2018/10/xml-tutorial-learn-xml/ ➢http://www.xmlmaster.org/en/article/d01/
  • 25. UNIT II : XML XML MCQs 25 XML – MCQs 1.XML stands for ______________. a) None of these b) Extensible Markup Language C)Extensible Mashup Language d)Extended Mashup Language 2.XML is designed to ______________ and store data. a)transport b)None of these c)design d)verify 3.XML is much more similar like ______________. a)C Programming b)CSS c)JavaScript d)HTML 4.Which of the following is not a function of XML? a)Store Information b)Transport Information. c)Structure Information d)Style Information 5.XML deals with storage and ______________transport of data. a)Transport b)Design c)Minify d)Filter
  • 26. UNIT II : XML XML Tutorial Problems 26 XML –Tutorial Problems: 1.Write a XML to populate data to web pages 2.Write a php program to extract data from XML
  • 27. UNIT II : XML XML Questions 27 XML –universities & Important Questions: 1. Explain and show how XML is useful in defining data for web applications. 2. Explain the various terms related to Document Type Definition. 3. Design an XML schema for hospital information management. Include every feature available with schema. 4. Explain how styling XML with cascading style sheets is done for the library information domain. 5. List and Explain the important features of XML which make it more suitable than HTML for creating web related services. 6. Define an xml scheme to show how an XML Scheme can be created 7. Define Attributes in XML .Also different types of attributes. 8. List the elements in XML .Also different types of content of Elements. 9. How do you define the elements of an XML document in an XML Schema? 10. How do you set default and fixed values for simple Elements?