SlideShare a Scribd company logo
Introduction to XML
What is XML?



 Extensible Markup Language

 Extensible-Not fixed format like HTML

 Meta language - Language for describing other languages

 Enables you to define your own customized markup

 Focus on what the data is

 Simplified version of SGML
Why XML?




 Richly structured documents could be used over the web.

 Human readable and also easy to edit/view.

 XML documents are language neutral.

 Platform-independent.
Basic XML Rules



 Xml is case sensitive

 All start tags must have end tags

 Elements must be properly nested

 XML declaration is the first statement

 Every document must contain a root element

 Attribute values must have quotation marks

 Certain characters are reserved for parsing
Differences between XML and HTML




Extensible Markup Language        Hyper Text Markup Language
XML is designed to store the data HTML is designed to display the
                                  data
XML focus on what the data is     HTML focus on how data looks
XML allows us to define our own   HTML has predefined set of tags
tags
XML is used to transport the data HTML is used to format and
                                  display data
XML Benefits




 XML improves the functionality of web technologies through the use
of a more flexible and adaptable means to identify information .

 XML is a Meta language, Language that describes other languages.
XML Editors



Xml editor is a markup language editor with added
functionality to facilitate the editing of xml.



Xml editor should be able to

          Add closing tags to your opening tags automatically
          Force you to write valid xml
          Verify your xml against a DTD
          Verify your xml against a Schema
          Color codes your xml syntax
Some of the professional xml editors are


           EmEditor

           XML Cook top

           XML Pro

           XML Spy
XML Tags




Xml tags are very similar to HTML , The difference is that xml
tags are not pre-defined like HTML

Example

<Composer> is an example for an opening tag, In XML all
opening tags must have closing tags, in this case the closing tag
would look like </Composer>.
Prolog

Prolog refers to the information that appears before the start tag
of the document or root element. It includes information that
applies to the document as a whole, such as character encoding,
document structure, and style sheets.


 <?xml version="1.0" encoding="UTF-8"?>
 <?xml-stylesheet type="text/xsl" href=“Book.xsl"?>
 <!DOCTYPE catalog SYSTEM "catalog.dtd“>
XML Declaration

XML declaration typically appears as the first line in an XML
document. The XML declaration is not required, however, if used it
must be the first line in the document.

XML declaration in the document map consists


Version number

<?xml version="1.0"?>

This is mandatory. Although the number might change for future
versions of XML, 1.0 is the current version.
XML Declaration Con.



Encoding declaration

<?xml version="1.0" encoding="UTF-8"?>

This is optional. If used, the encoding declaration must
appear immediately after the version information in the
XML declaration.
XML Declaration Con.




Standalone declaration

<?xml version="1.0" encoding="UTF-8" standalone="YES"?>

This is optional. If used, the standalone declaration must appear last
in the XML declaration.
XML Syntax Rules




 Tags are case sensitive

 Each document must have a root

 Closing tags are required

 Values must be enclosed in quotation marks

 Elements must be properly nested

 Entities must be declared
Tags are Case-Sensitive




<CourseName> is different from<coursename>

<Bad>This is bad XML</bad>
XML Documents Must Have a Root



    <Root>

      <Child>

        <Subchild>

        </Subchild>

       </Child>

    </Root>
Closing Tags are Required




 This is bad XML<p>

 This is also bad<br>

 <p>This is ok</p>

This is the shortcut for an empty tag<br/>
Values Must be in Quotation Marks




<student id=1234>Bad Student!</student>

<student id="1234">Good Student</student>
Comments in XML



Comments should not appear on the first line.

The string "--" (double-hyphen) is not allowed (as it is used to
delimit comments), and entities must not be recognized within
comments.

Syntax for writing comments in xml is similar to that of HTML.

<! -- This is a comment -->
Elements Must be Properly Nested




<tag1><tag2>Badly nested!</tag1></tag2>

<tag1><tag2>Looks good!</tag2></tag1>
Structure of XML
Structure of XML con..




<?xml version="1.0"?>
<note>
         <To>workshop</To>
         <From>Trainer</From>
         <Heading>Reminder</Heading>
         <Body>Don't forget me this
         weekend!</Body>
</note>
Types of XML Documents




   Well-formed

   Valid

   Invalid
Well Formed XML

     Well formed xml document does not need a DTD, but is must
     confirm to the xml syntax rules.


Valid XML

     Valid documents confirms not only to the syntax, but also to
     the DTD.


 Invalid XML

       Neither it follows xml syntax rules nor DTD.
Well-Formed XML


Follows the XML syntax rules


          <?xml version="1.0"?>
          <course>
          <name>Markup Languages</name>
          <number>99999</number>
          <college>New Generation</college>
          <credits>4</credits>
          </course>
Valid XML



Well-formed XML doc that conforms to a DTD.


     <?xml version="1.0"?>
     <!DOCTYPE course SYSTEM "courses.dtd">
     <course>
     <name>Markup Languages</name>
     <number>9999-82</number>
     <college>New Generation</college>
     <credits>4</credits>
     </course>
Invalid XML



Example


     <?xml version="1.0"?>
     <course>
     <name>Markup Languages</name>
     <number type=2>9999-82</number>
     <college>New Generation</college>
     <credits>4
     </course>
What is DTD?




DTD (Document Type Definition) describes the structure of one
or more XML documents.

OR

Helps in eliminating errors when creating or editing XML
documents.
Building Blocks of DTD




   Elements

   Attributes

   Entities

   PCDATA

   CDATA
Declaring Elements in a DTD Cont.




<!ELEMENT name ANY>
Creates an element which can contain both Plain text and tags

<!ELEMENT name (#PCDATA)>
Creates an element which can contain plain text but NOT other
tags

<!ELEMENT name EMPTY>
Creates an empty element
Declaring Elements in a DTD Cont.




<!ELEMENT name (child1, child2)>
Creates an element with children which must be present in the
order listed

<!ELEMENT name (child1 | child2)>
Creates an element with options

Either child1 or child2 must appear, but not both.
Declaring Elements in a DTD Cont.



<!ELEMENT name (child)?>
Creates an element with a child which must appear zero or one
times

<!ELEMENT name (child)+>
Creates an element with a child which must appear one or more
times

<!ELEMENT name (child)*>
Creates an element with a child which may appear zero or more
times
Declaring Attributes in a DTD


General form


    <!ATTLIST Target-element name Type Default>

    Target-element is the element to which the attribute applies

    Name is the attribute name type is what type of data the attribute
    contains

    Default is whether the item is required
Attribute-type can be one of the following

 Type                        Description
 CDATA                       The value is character data
 (en1|en2|..)                The value must be one from an
                             enumerated list
 ID                          The value is a unique id
 IDREF                       The value is the id of another
                             element
 IDREFS                      The value is a list of other ids
 NMTOKEN                     The value is a valid xml name
 NMTOKENS                    The value is a list of valid xml
                             names
 ENTITY                      The value is an entity
 ENTITIES                    The value is a list of entities
 NOTATION                    The value is a name of a notation
 xml                         The value is a predefined xml
                             value
Default-value can be one of the following



Value                   Explanation
value                   The default value of the attribute
#REQUIRED               The attribute is required
#IMPLIED                The attribute is not required
#FIXED value            The attribute value is fixed
Example


<?xml version="1.0"?>
<!DOCTYPE Parts [
<!ELEMENT Parts (Title?, Part*)>
<!ELEMENT Title (#PCDATA)>
<!ELEMENT Part (Item, Manufacturer, Model, Cost)+>
<!ATTLIST Parttype (Computer|Auto|Airplane) #IMPLIED>
<!ELEMENT Item (#PCDATA)>
<!ELEMENT Manufacturer (#PCDATA)>
<!ELEMENT Model (#PCDATA)>
<!ELEMENT Cost (#PCDATA)>
]>
Example cont..


<Parts>
<Title>Main Heading</Title>
<Part type="Computer">
<Item></Item>
<Manufacture></Manufacture>
<Model></Model>
<Cost></Cost>
</Part>
</Parts>
XML-Entities




An entity is a name that represents a special character, additional text or
a file.

There are two kinds of entities

 General entities

 Parameter entities
XML Predefined Entities




Entity Name                  Replacement as Text
&lt;                         <
&gt;                         >
&amp;                        &
&apos;                       ‘
&quot;                       “
XML-Entities cont..



General entities: Used in the context of documents.

References to general entities start with & and end with;

Parameter entities: Used in a document’s DTD.

References to parameter entities start with % and end with;
Example

<?xml version="1.0"?>
<!DOCTYPE Film [
<!ENTITY COM "Comedy">
<!ENTITY SF "Science Fiction">
<!ELEMENT Film (Title+, Genre, Year)>
<!ELEMENT Title (#PCDATA)>
<!ELEMENT Genre (#PCDATA)>
<!ELEMENT Year (#PCDATA)>
]>
<Film>
<Title id="1">Tootsie</Title>
<Genre>&COM;</Genre>
<Year>1982</Year>
<Title Id="2">Jurassic Park</Title>
<Genre>&SF;</Genre>
<Year>1993</Year>
</Film>
DTD Classification




 Internal document type definition (DTD)

 External document type definition (DTD)
Internal DTD




If a DTD is used only by a single XML document, it can be put directly
in that document.

Syntax

<! DOCTYPE Root-Element [DTD Specification]>
Example

<?xml version="1.0"?>
<!DOCTYPE Note [
<!ELEMENT Note (To, From, Heading, Body)>
<!ELEMENT To (#PCDATA)>
<!ELEMENT From (#PCDATA)>
<!ELEMENT Heading (#PCDATA)>
<!ELEMENT Body (#PCDATA)>
]>
<Note>
<To>Data1</To>
<From>Data2</From>
<Heading>Reminder</Heading>
<Body>Don't Forget Me This Weekend</Body>
</Note>
External DTD




External DTD is one that resides in a separate document. It refers
saving the DTD as a separate file with extension .dtd and then
referencing the DTD file within the XML document.

Syntax

<! DOCTYPE Root-Element SYSTEM "File-Name">
Example

<?xml version="1.0"?>
<!DOCTYPE note SYSTEM "note.dtd">
<note>
<to>Data1</to>
<from>Data2</from>
<heading>Reminder</heading>
<body>Don't forget me this weekend!</body>
</note>

And this is the file "note.dtd" which contains the DTD

<!ELEMENT note (to, from, heading, body)>
<!ELEMENT to (#PCDATA)>
<!ELEMENT from (#PCDATA)>
<!ELEMENT heading (#PCDATA)>
<!ELEMENT body (#PCDATA)>
What's wrong with DTD?




 DTD’s use old SGML style definitions

 DTD are not written in XML

 Only defaults for attributes, not for elements

 No support for Namespaces
XML Schema




XML definition system developed to replace Document Type
Definitions (DTD)
XML schema language specification shall



   Be prepared quickly.

   Be precise, concise, human-readable.
Formatting XML using CSS



What is CSS?

     CSS stands for Cascading Style Sheets.

     Styles define how to display (XML,HTML)elements.

     External Style Sheets can save a lot of work.

     External Style Sheets are stored in CSS files.
XML and CSS




XML and CSS simplify document creation. CSS, on the other
hand, makes it possible to present that document in a
browser.
Example

<?xml version=“1.0”?>
<?xml-stylesheet type="text/CSS" href="tutorials.CSS"?>
<tutorials>
<tutorial>
<name>xml Tutorial</name>
<url>www.testport.com</url>
</tutorial>
<tutorial>
<name>HTML Tutorial</name>
<url>www.Test IT Solutions.com</url>
</tutorial>
</tutorials>
CSS File

Tutorials {
Margin: 10px;
Background-color: #ccff00;
Font-family: veranda, Helvetica, sans-serif; }
Name {
Display: block;
Font-weight: bold; }
url {
Display: block;
Color: #636363;
Font-size: small;
Font-style: Italic;
}
Formatting XML using XSLT



What is XSLT?

     Stands for XSL Transformations

     Most important part of XSL

     Transforms an XML document into another XML document

     Uses XPath to navigate in xml documents

     W3C Recommendation.
How Does it Work?
XSLT uses XPath to define parts of the source document that
should match one or more predefined templates. When a
match is found, XSLT will transform the matching part of the
source document into the result document.
XML Technologies



What Is XHTML?

 Stands for Extensible Hypertext Markup Language

 Almost identical to HTML 4.01

 Stricter and cleaner version of HTML

 Defined as an XML application

 W3C Recommendation
XHTML – Why?




 Combination of HTML and XML

 Consists of all the elements in HTML ,Combined with the
strict syntax of XML
What is XSL?




XSL stands for Extensible Style Sheet Language. The World
Wide Web Consortium (W3C) started to develop XSL
because there was a need for an XML-based Style sheet
Language.
XSL consists of three parts



 XSLT - A language for transforming XML documents

 XPath – A language for navigating in XML documents

 XSL-FO - A language for formatting XML documents
Comparing CSS and XSLT




CSS                               XSLT
Simple to use, and suitable for   Complex to use
simple documents
Can’t reorder, add, delete or     Can re order, add, delete
perform operations on elements    elements
Uses less memory                  Uses more memory and
                                  processor power
Does not use XML syntax           Follows the XML syntax
Other Related Technologies




 CSS - Cascading Style Sheets for display.

 XSL - Extensible Style sheet Language for display.

 XSLT - XSL Transformations.

 Xpath - Allows XML files to include other content.

 Xlink - Allows XML files to link to other XML files.

 Xquery - Allows XML files to query databases.
Conclusion




 XML is a self-descriptive language

 XML is a powerful language to describe structure data for
 web application

 XML is currently applied in many fields

 Many vendors already supports or will support XML
Thank You

More Related Content

What's hot

XML
XMLXML
01 xml document structure
01 xml document structure01 xml document structure
01 xml document structure
Baskarkncet
 
Document Type Definitions
Document Type DefinitionsDocument Type Definitions
XML Schema
XML SchemaXML Schema
XML Schema
yht4ever
 
Xml dtd
Xml dtdXml dtd
Xml dtd
sana mateen
 
Php
PhpPhp
Introduction to DTD
Introduction to DTDIntroduction to DTD
Introduction to DTD
torp42
 
XML Introduction
XML IntroductionXML Introduction
XML Introduction
Marco Bresciani
 
XML
XMLXML
Xml
XmlXml
2 dtd - validating xml documents
2   dtd - validating xml documents2   dtd - validating xml documents
2 dtd - validating xml documents
gauravashq
 
Dtd
DtdDtd
Introduction to XML
Introduction to XMLIntroduction to XML
Introduction to XML
yht4ever
 
SQL Server - Querying and Managing XML Data
SQL Server - Querying and Managing XML DataSQL Server - Querying and Managing XML Data
SQL Server - Querying and Managing XML Data
Marek Maśko
 
Xml Presentation-3
Xml Presentation-3Xml Presentation-3
Xml Presentation-3
Sudharsan S
 
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
Ông Thông
 
00 introduction
00 introduction00 introduction
00 introduction
Baskarkncet
 
02 well formed and valid documents
02 well formed and valid documents02 well formed and valid documents
02 well formed and valid documents
Baskarkncet
 
XML
XMLXML
Introduction to XML
Introduction to XMLIntroduction to XML
Introduction to XML
Bình Trọng Án
 

What's hot (20)

XML
XMLXML
XML
 
01 xml document structure
01 xml document structure01 xml document structure
01 xml document structure
 
Document Type Definitions
Document Type DefinitionsDocument Type Definitions
Document Type Definitions
 
XML Schema
XML SchemaXML Schema
XML Schema
 
Xml dtd
Xml dtdXml dtd
Xml dtd
 
Php
PhpPhp
Php
 
Introduction to DTD
Introduction to DTDIntroduction to DTD
Introduction to DTD
 
XML Introduction
XML IntroductionXML Introduction
XML Introduction
 
XML
XMLXML
XML
 
Xml
XmlXml
Xml
 
2 dtd - validating xml documents
2   dtd - validating xml documents2   dtd - validating xml documents
2 dtd - validating xml documents
 
Dtd
DtdDtd
Dtd
 
Introduction to XML
Introduction to XMLIntroduction to XML
Introduction to XML
 
SQL Server - Querying and Managing XML Data
SQL Server - Querying and Managing XML DataSQL Server - Querying and Managing XML Data
SQL Server - Querying and Managing XML Data
 
Xml Presentation-3
Xml Presentation-3Xml Presentation-3
Xml Presentation-3
 
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
 
00 introduction
00 introduction00 introduction
00 introduction
 
02 well formed and valid documents
02 well formed and valid documents02 well formed and valid documents
02 well formed and valid documents
 
XML
XMLXML
XML
 
Introduction to XML
Introduction to XMLIntroduction to XML
Introduction to XML
 

Viewers also liked

Ajax
AjaxAjax
Ajax
soumya
 
AJAX
AJAXAJAX
Dom
DomDom
Dom
soumya
 
Json
JsonJson
Json
soumya
 
Ajax Patterns : Periodic Refresh & Multi Stage Download
Ajax Patterns : Periodic Refresh & Multi Stage DownloadAjax Patterns : Periodic Refresh & Multi Stage Download
Ajax Patterns : Periodic Refresh & Multi Stage Download
Eshan Mudwel
 
Ajax part i
Ajax part iAjax part i
Ajax part i
Mukesh Tekwani
 
TYCS Ajax practicals sem VI
TYCS Ajax practicals sem VI TYCS Ajax practicals sem VI
TYCS Ajax practicals sem VI
yogita kachve
 
Introduction to xml
Introduction to xmlIntroduction to xml
Introduction to xml
soumya
 
tybsc it asp.net full unit 1,2,3,4,5,6 notes
tybsc it asp.net full unit 1,2,3,4,5,6 notestybsc it asp.net full unit 1,2,3,4,5,6 notes
tybsc it asp.net full unit 1,2,3,4,5,6 notes
WE-IT TUTORIALS
 
The Presentation Come-Back Kid
The Presentation Come-Back KidThe Presentation Come-Back Kid
The Presentation Come-Back Kid
Ethos3
 

Viewers also liked (10)

Ajax
AjaxAjax
Ajax
 
AJAX
AJAXAJAX
AJAX
 
Dom
DomDom
Dom
 
Json
JsonJson
Json
 
Ajax Patterns : Periodic Refresh & Multi Stage Download
Ajax Patterns : Periodic Refresh & Multi Stage DownloadAjax Patterns : Periodic Refresh & Multi Stage Download
Ajax Patterns : Periodic Refresh & Multi Stage Download
 
Ajax part i
Ajax part iAjax part i
Ajax part i
 
TYCS Ajax practicals sem VI
TYCS Ajax practicals sem VI TYCS Ajax practicals sem VI
TYCS Ajax practicals sem VI
 
Introduction to xml
Introduction to xmlIntroduction to xml
Introduction to xml
 
tybsc it asp.net full unit 1,2,3,4,5,6 notes
tybsc it asp.net full unit 1,2,3,4,5,6 notestybsc it asp.net full unit 1,2,3,4,5,6 notes
tybsc it asp.net full unit 1,2,3,4,5,6 notes
 
The Presentation Come-Back Kid
The Presentation Come-Back KidThe Presentation Come-Back Kid
The Presentation Come-Back Kid
 

Similar to Xml

Intro to xml
Intro to xmlIntro to xml
Intro to xml
Tarun Jain
 
XML-Unit 1.ppt
XML-Unit 1.pptXML-Unit 1.ppt
XML-Unit 1.ppt
ssuseree7dcd
 
xml introduction in web technologies subject
xml introduction in web technologies subjectxml introduction in web technologies subject
xml introduction in web technologies subject
UdayKumar693239
 
Xml 1
Xml 1Xml 1
Xml
XmlXml
Xml and DTD's
Xml and DTD'sXml and DTD's
Xml and DTD's
Swati Parmar
 
Xml intro1
Xml intro1Xml intro1
XML Presentation-2
XML Presentation-2XML Presentation-2
XML Presentation-2
Sudharsan S
 
Web Technologies Unit 2 Print.pdf
Web Technologies Unit 2 Print.pdfWeb Technologies Unit 2 Print.pdf
Web Technologies Unit 2 Print.pdf
AnonymousXhmybK
 
chapter 4 web authoring unit 4 xml.pptx
chapter 4 web authoring  unit 4 xml.pptxchapter 4 web authoring  unit 4 xml.pptx
chapter 4 web authoring unit 4 xml.pptx
amare63
 
Xml schema
Xml schemaXml schema
Xml schema
Akshaya Akshaya
 
Xml by Luqman
Xml by LuqmanXml by Luqman
Xml by Luqman
Luqman Shareef
 
Chen test paper20abcdeftfdfd
Chen test paper20abcdeftfdfdChen test paper20abcdeftfdfd
Chen test paper20abcdeftfdfd
techweb08
 
Test for an issue
Test for an issueTest for an issue
Test for an issue
techweb08
 
Chen's first test slides
Chen's first test slidesChen's first test slides
Chen's first test slides
Hima Challa
 
distributed system concerned lab sessions
distributed system concerned lab sessionsdistributed system concerned lab sessions
distributed system concerned lab sessions
milkesa13
 
Xml
XmlXml
Xml and Co.
Xml and Co.Xml and Co.
Xml and Co.
Findik Dervis
 
II UNIT PPT NOTES.pdf this is the data structures
II UNIT PPT NOTES.pdf this is the data structuresII UNIT PPT NOTES.pdf this is the data structures
II UNIT PPT NOTES.pdf this is the data structures
PriyankaRamavath3
 
WEB PROGRAMMING
WEB PROGRAMMINGWEB PROGRAMMING
WEB PROGRAMMING
sweetysweety8
 

Similar to Xml (20)

Intro to xml
Intro to xmlIntro to xml
Intro to xml
 
XML-Unit 1.ppt
XML-Unit 1.pptXML-Unit 1.ppt
XML-Unit 1.ppt
 
xml introduction in web technologies subject
xml introduction in web technologies subjectxml introduction in web technologies subject
xml introduction in web technologies subject
 
Xml 1
Xml 1Xml 1
Xml 1
 
Xml
XmlXml
Xml
 
Xml and DTD's
Xml and DTD'sXml and DTD's
Xml and DTD's
 
Xml intro1
Xml intro1Xml intro1
Xml intro1
 
XML Presentation-2
XML Presentation-2XML Presentation-2
XML Presentation-2
 
Web Technologies Unit 2 Print.pdf
Web Technologies Unit 2 Print.pdfWeb Technologies Unit 2 Print.pdf
Web Technologies Unit 2 Print.pdf
 
chapter 4 web authoring unit 4 xml.pptx
chapter 4 web authoring  unit 4 xml.pptxchapter 4 web authoring  unit 4 xml.pptx
chapter 4 web authoring unit 4 xml.pptx
 
Xml schema
Xml schemaXml schema
Xml schema
 
Xml by Luqman
Xml by LuqmanXml by Luqman
Xml by Luqman
 
Chen test paper20abcdeftfdfd
Chen test paper20abcdeftfdfdChen test paper20abcdeftfdfd
Chen test paper20abcdeftfdfd
 
Test for an issue
Test for an issueTest for an issue
Test for an issue
 
Chen's first test slides
Chen's first test slidesChen's first test slides
Chen's first test slides
 
distributed system concerned lab sessions
distributed system concerned lab sessionsdistributed system concerned lab sessions
distributed system concerned lab sessions
 
Xml
XmlXml
Xml
 
Xml and Co.
Xml and Co.Xml and Co.
Xml and Co.
 
II UNIT PPT NOTES.pdf this is the data structures
II UNIT PPT NOTES.pdf this is the data structuresII UNIT PPT NOTES.pdf this is the data structures
II UNIT PPT NOTES.pdf this is the data structures
 
WEB PROGRAMMING
WEB PROGRAMMINGWEB PROGRAMMING
WEB PROGRAMMING
 

Recently uploaded

HCL Notes und Domino Lizenzkostenreduzierung in der Welt von DLAU
HCL Notes und Domino Lizenzkostenreduzierung in der Welt von DLAUHCL Notes und Domino Lizenzkostenreduzierung in der Welt von DLAU
HCL Notes und Domino Lizenzkostenreduzierung in der Welt von DLAU
panagenda
 
20240609 QFM020 Irresponsible AI Reading List May 2024
20240609 QFM020 Irresponsible AI Reading List May 202420240609 QFM020 Irresponsible AI Reading List May 2024
20240609 QFM020 Irresponsible AI Reading List May 2024
Matthew Sinclair
 
みなさんこんにちはこれ何文字まで入るの?40文字以下不可とか本当に意味わからないけどこれ限界文字数書いてないからマジでやばい文字数いけるんじゃないの?えこ...
みなさんこんにちはこれ何文字まで入るの?40文字以下不可とか本当に意味わからないけどこれ限界文字数書いてないからマジでやばい文字数いけるんじゃないの?えこ...みなさんこんにちはこれ何文字まで入るの?40文字以下不可とか本当に意味わからないけどこれ限界文字数書いてないからマジでやばい文字数いけるんじゃないの?えこ...
みなさんこんにちはこれ何文字まで入るの?40文字以下不可とか本当に意味わからないけどこれ限界文字数書いてないからマジでやばい文字数いけるんじゃないの?えこ...
名前 です男
 
Artificial Intelligence for XMLDevelopment
Artificial Intelligence for XMLDevelopmentArtificial Intelligence for XMLDevelopment
Artificial Intelligence for XMLDevelopment
Octavian Nadolu
 
Let's Integrate MuleSoft RPA, COMPOSER, APM with AWS IDP along with Slack
Let's Integrate MuleSoft RPA, COMPOSER, APM with AWS IDP along with SlackLet's Integrate MuleSoft RPA, COMPOSER, APM with AWS IDP along with Slack
Let's Integrate MuleSoft RPA, COMPOSER, APM with AWS IDP along with Slack
shyamraj55
 
Serial Arm Control in Real Time Presentation
Serial Arm Control in Real Time PresentationSerial Arm Control in Real Time Presentation
Serial Arm Control in Real Time Presentation
tolgahangng
 
Communications Mining Series - Zero to Hero - Session 1
Communications Mining Series - Zero to Hero - Session 1Communications Mining Series - Zero to Hero - Session 1
Communications Mining Series - Zero to Hero - Session 1
DianaGray10
 
Unlock the Future of Search with MongoDB Atlas_ Vector Search Unleashed.pdf
Unlock the Future of Search with MongoDB Atlas_ Vector Search Unleashed.pdfUnlock the Future of Search with MongoDB Atlas_ Vector Search Unleashed.pdf
Unlock the Future of Search with MongoDB Atlas_ Vector Search Unleashed.pdf
Malak Abu Hammad
 
20240607 QFM018 Elixir Reading List May 2024
20240607 QFM018 Elixir Reading List May 202420240607 QFM018 Elixir Reading List May 2024
20240607 QFM018 Elixir Reading List May 2024
Matthew Sinclair
 
GraphSummit Singapore | The Art of the Possible with Graph - Q2 2024
GraphSummit Singapore | The Art of the  Possible with Graph - Q2 2024GraphSummit Singapore | The Art of the  Possible with Graph - Q2 2024
GraphSummit Singapore | The Art of the Possible with Graph - Q2 2024
Neo4j
 
HCL Notes and Domino License Cost Reduction in the World of DLAU
HCL Notes and Domino License Cost Reduction in the World of DLAUHCL Notes and Domino License Cost Reduction in the World of DLAU
HCL Notes and Domino License Cost Reduction in the World of DLAU
panagenda
 
National Security Agency - NSA mobile device best practices
National Security Agency - NSA mobile device best practicesNational Security Agency - NSA mobile device best practices
National Security Agency - NSA mobile device best practices
Quotidiano Piemontese
 
Full-RAG: A modern architecture for hyper-personalization
Full-RAG: A modern architecture for hyper-personalizationFull-RAG: A modern architecture for hyper-personalization
Full-RAG: A modern architecture for hyper-personalization
Zilliz
 
Essentials of Automations: The Art of Triggers and Actions in FME
Essentials of Automations: The Art of Triggers and Actions in FMEEssentials of Automations: The Art of Triggers and Actions in FME
Essentials of Automations: The Art of Triggers and Actions in FME
Safe Software
 
UiPath Test Automation using UiPath Test Suite series, part 5
UiPath Test Automation using UiPath Test Suite series, part 5UiPath Test Automation using UiPath Test Suite series, part 5
UiPath Test Automation using UiPath Test Suite series, part 5
DianaGray10
 
Pushing the limits of ePRTC: 100ns holdover for 100 days
Pushing the limits of ePRTC: 100ns holdover for 100 daysPushing the limits of ePRTC: 100ns holdover for 100 days
Pushing the limits of ePRTC: 100ns holdover for 100 days
Adtran
 
Driving Business Innovation: Latest Generative AI Advancements & Success Story
Driving Business Innovation: Latest Generative AI Advancements & Success StoryDriving Business Innovation: Latest Generative AI Advancements & Success Story
Driving Business Innovation: Latest Generative AI Advancements & Success Story
Safe Software
 
Goodbye Windows 11: Make Way for Nitrux Linux 3.5.0!
Goodbye Windows 11: Make Way for Nitrux Linux 3.5.0!Goodbye Windows 11: Make Way for Nitrux Linux 3.5.0!
Goodbye Windows 11: Make Way for Nitrux Linux 3.5.0!
SOFTTECHHUB
 
20240605 QFM017 Machine Intelligence Reading List May 2024
20240605 QFM017 Machine Intelligence Reading List May 202420240605 QFM017 Machine Intelligence Reading List May 2024
20240605 QFM017 Machine Intelligence Reading List May 2024
Matthew Sinclair
 
GraphRAG for Life Science to increase LLM accuracy
GraphRAG for Life Science to increase LLM accuracyGraphRAG for Life Science to increase LLM accuracy
GraphRAG for Life Science to increase LLM accuracy
Tomaz Bratanic
 

Recently uploaded (20)

HCL Notes und Domino Lizenzkostenreduzierung in der Welt von DLAU
HCL Notes und Domino Lizenzkostenreduzierung in der Welt von DLAUHCL Notes und Domino Lizenzkostenreduzierung in der Welt von DLAU
HCL Notes und Domino Lizenzkostenreduzierung in der Welt von DLAU
 
20240609 QFM020 Irresponsible AI Reading List May 2024
20240609 QFM020 Irresponsible AI Reading List May 202420240609 QFM020 Irresponsible AI Reading List May 2024
20240609 QFM020 Irresponsible AI Reading List May 2024
 
みなさんこんにちはこれ何文字まで入るの?40文字以下不可とか本当に意味わからないけどこれ限界文字数書いてないからマジでやばい文字数いけるんじゃないの?えこ...
みなさんこんにちはこれ何文字まで入るの?40文字以下不可とか本当に意味わからないけどこれ限界文字数書いてないからマジでやばい文字数いけるんじゃないの?えこ...みなさんこんにちはこれ何文字まで入るの?40文字以下不可とか本当に意味わからないけどこれ限界文字数書いてないからマジでやばい文字数いけるんじゃないの?えこ...
みなさんこんにちはこれ何文字まで入るの?40文字以下不可とか本当に意味わからないけどこれ限界文字数書いてないからマジでやばい文字数いけるんじゃないの?えこ...
 
Artificial Intelligence for XMLDevelopment
Artificial Intelligence for XMLDevelopmentArtificial Intelligence for XMLDevelopment
Artificial Intelligence for XMLDevelopment
 
Let's Integrate MuleSoft RPA, COMPOSER, APM with AWS IDP along with Slack
Let's Integrate MuleSoft RPA, COMPOSER, APM with AWS IDP along with SlackLet's Integrate MuleSoft RPA, COMPOSER, APM with AWS IDP along with Slack
Let's Integrate MuleSoft RPA, COMPOSER, APM with AWS IDP along with Slack
 
Serial Arm Control in Real Time Presentation
Serial Arm Control in Real Time PresentationSerial Arm Control in Real Time Presentation
Serial Arm Control in Real Time Presentation
 
Communications Mining Series - Zero to Hero - Session 1
Communications Mining Series - Zero to Hero - Session 1Communications Mining Series - Zero to Hero - Session 1
Communications Mining Series - Zero to Hero - Session 1
 
Unlock the Future of Search with MongoDB Atlas_ Vector Search Unleashed.pdf
Unlock the Future of Search with MongoDB Atlas_ Vector Search Unleashed.pdfUnlock the Future of Search with MongoDB Atlas_ Vector Search Unleashed.pdf
Unlock the Future of Search with MongoDB Atlas_ Vector Search Unleashed.pdf
 
20240607 QFM018 Elixir Reading List May 2024
20240607 QFM018 Elixir Reading List May 202420240607 QFM018 Elixir Reading List May 2024
20240607 QFM018 Elixir Reading List May 2024
 
GraphSummit Singapore | The Art of the Possible with Graph - Q2 2024
GraphSummit Singapore | The Art of the  Possible with Graph - Q2 2024GraphSummit Singapore | The Art of the  Possible with Graph - Q2 2024
GraphSummit Singapore | The Art of the Possible with Graph - Q2 2024
 
HCL Notes and Domino License Cost Reduction in the World of DLAU
HCL Notes and Domino License Cost Reduction in the World of DLAUHCL Notes and Domino License Cost Reduction in the World of DLAU
HCL Notes and Domino License Cost Reduction in the World of DLAU
 
National Security Agency - NSA mobile device best practices
National Security Agency - NSA mobile device best practicesNational Security Agency - NSA mobile device best practices
National Security Agency - NSA mobile device best practices
 
Full-RAG: A modern architecture for hyper-personalization
Full-RAG: A modern architecture for hyper-personalizationFull-RAG: A modern architecture for hyper-personalization
Full-RAG: A modern architecture for hyper-personalization
 
Essentials of Automations: The Art of Triggers and Actions in FME
Essentials of Automations: The Art of Triggers and Actions in FMEEssentials of Automations: The Art of Triggers and Actions in FME
Essentials of Automations: The Art of Triggers and Actions in FME
 
UiPath Test Automation using UiPath Test Suite series, part 5
UiPath Test Automation using UiPath Test Suite series, part 5UiPath Test Automation using UiPath Test Suite series, part 5
UiPath Test Automation using UiPath Test Suite series, part 5
 
Pushing the limits of ePRTC: 100ns holdover for 100 days
Pushing the limits of ePRTC: 100ns holdover for 100 daysPushing the limits of ePRTC: 100ns holdover for 100 days
Pushing the limits of ePRTC: 100ns holdover for 100 days
 
Driving Business Innovation: Latest Generative AI Advancements & Success Story
Driving Business Innovation: Latest Generative AI Advancements & Success StoryDriving Business Innovation: Latest Generative AI Advancements & Success Story
Driving Business Innovation: Latest Generative AI Advancements & Success Story
 
Goodbye Windows 11: Make Way for Nitrux Linux 3.5.0!
Goodbye Windows 11: Make Way for Nitrux Linux 3.5.0!Goodbye Windows 11: Make Way for Nitrux Linux 3.5.0!
Goodbye Windows 11: Make Way for Nitrux Linux 3.5.0!
 
20240605 QFM017 Machine Intelligence Reading List May 2024
20240605 QFM017 Machine Intelligence Reading List May 202420240605 QFM017 Machine Intelligence Reading List May 2024
20240605 QFM017 Machine Intelligence Reading List May 2024
 
GraphRAG for Life Science to increase LLM accuracy
GraphRAG for Life Science to increase LLM accuracyGraphRAG for Life Science to increase LLM accuracy
GraphRAG for Life Science to increase LLM accuracy
 

Xml

  • 2. What is XML?  Extensible Markup Language  Extensible-Not fixed format like HTML  Meta language - Language for describing other languages  Enables you to define your own customized markup  Focus on what the data is  Simplified version of SGML
  • 3. Why XML?  Richly structured documents could be used over the web.  Human readable and also easy to edit/view.  XML documents are language neutral.  Platform-independent.
  • 4. Basic XML Rules  Xml is case sensitive  All start tags must have end tags  Elements must be properly nested  XML declaration is the first statement  Every document must contain a root element  Attribute values must have quotation marks  Certain characters are reserved for parsing
  • 5. Differences between XML and HTML Extensible Markup Language Hyper Text Markup Language XML is designed to store the data HTML is designed to display the data XML focus on what the data is HTML focus on how data looks XML allows us to define our own HTML has predefined set of tags tags XML is used to transport the data HTML is used to format and display data
  • 6. XML Benefits  XML improves the functionality of web technologies through the use of a more flexible and adaptable means to identify information .  XML is a Meta language, Language that describes other languages.
  • 7. XML Editors Xml editor is a markup language editor with added functionality to facilitate the editing of xml. Xml editor should be able to  Add closing tags to your opening tags automatically  Force you to write valid xml  Verify your xml against a DTD  Verify your xml against a Schema  Color codes your xml syntax
  • 8. Some of the professional xml editors are  EmEditor  XML Cook top  XML Pro  XML Spy
  • 9. XML Tags Xml tags are very similar to HTML , The difference is that xml tags are not pre-defined like HTML Example <Composer> is an example for an opening tag, In XML all opening tags must have closing tags, in this case the closing tag would look like </Composer>.
  • 10. Prolog Prolog refers to the information that appears before the start tag of the document or root element. It includes information that applies to the document as a whole, such as character encoding, document structure, and style sheets. <?xml version="1.0" encoding="UTF-8"?> <?xml-stylesheet type="text/xsl" href=“Book.xsl"?> <!DOCTYPE catalog SYSTEM "catalog.dtd“>
  • 11. XML Declaration XML declaration typically appears as the first line in an XML document. The XML declaration is not required, however, if used it must be the first line in the document. XML declaration in the document map consists Version number <?xml version="1.0"?> This is mandatory. Although the number might change for future versions of XML, 1.0 is the current version.
  • 12. XML Declaration Con. Encoding declaration <?xml version="1.0" encoding="UTF-8"?> This is optional. If used, the encoding declaration must appear immediately after the version information in the XML declaration.
  • 13. XML Declaration Con. Standalone declaration <?xml version="1.0" encoding="UTF-8" standalone="YES"?> This is optional. If used, the standalone declaration must appear last in the XML declaration.
  • 14. XML Syntax Rules  Tags are case sensitive  Each document must have a root  Closing tags are required  Values must be enclosed in quotation marks  Elements must be properly nested  Entities must be declared
  • 15. Tags are Case-Sensitive <CourseName> is different from<coursename> <Bad>This is bad XML</bad>
  • 16. XML Documents Must Have a Root <Root> <Child> <Subchild> </Subchild> </Child> </Root>
  • 17. Closing Tags are Required  This is bad XML<p>  This is also bad<br>  <p>This is ok</p> This is the shortcut for an empty tag<br/>
  • 18. Values Must be in Quotation Marks <student id=1234>Bad Student!</student> <student id="1234">Good Student</student>
  • 19. Comments in XML Comments should not appear on the first line. The string "--" (double-hyphen) is not allowed (as it is used to delimit comments), and entities must not be recognized within comments. Syntax for writing comments in xml is similar to that of HTML. <! -- This is a comment -->
  • 20. Elements Must be Properly Nested <tag1><tag2>Badly nested!</tag1></tag2> <tag1><tag2>Looks good!</tag2></tag1>
  • 22. Structure of XML con.. <?xml version="1.0"?> <note> <To>workshop</To> <From>Trainer</From> <Heading>Reminder</Heading> <Body>Don't forget me this weekend!</Body> </note>
  • 23. Types of XML Documents  Well-formed  Valid  Invalid
  • 24. Well Formed XML Well formed xml document does not need a DTD, but is must confirm to the xml syntax rules. Valid XML Valid documents confirms not only to the syntax, but also to the DTD. Invalid XML Neither it follows xml syntax rules nor DTD.
  • 25. Well-Formed XML Follows the XML syntax rules <?xml version="1.0"?> <course> <name>Markup Languages</name> <number>99999</number> <college>New Generation</college> <credits>4</credits> </course>
  • 26. Valid XML Well-formed XML doc that conforms to a DTD. <?xml version="1.0"?> <!DOCTYPE course SYSTEM "courses.dtd"> <course> <name>Markup Languages</name> <number>9999-82</number> <college>New Generation</college> <credits>4</credits> </course>
  • 27. Invalid XML Example <?xml version="1.0"?> <course> <name>Markup Languages</name> <number type=2>9999-82</number> <college>New Generation</college> <credits>4 </course>
  • 28. What is DTD? DTD (Document Type Definition) describes the structure of one or more XML documents. OR Helps in eliminating errors when creating or editing XML documents.
  • 29. Building Blocks of DTD  Elements  Attributes  Entities  PCDATA  CDATA
  • 30. Declaring Elements in a DTD Cont. <!ELEMENT name ANY> Creates an element which can contain both Plain text and tags <!ELEMENT name (#PCDATA)> Creates an element which can contain plain text but NOT other tags <!ELEMENT name EMPTY> Creates an empty element
  • 31. Declaring Elements in a DTD Cont. <!ELEMENT name (child1, child2)> Creates an element with children which must be present in the order listed <!ELEMENT name (child1 | child2)> Creates an element with options Either child1 or child2 must appear, but not both.
  • 32. Declaring Elements in a DTD Cont. <!ELEMENT name (child)?> Creates an element with a child which must appear zero or one times <!ELEMENT name (child)+> Creates an element with a child which must appear one or more times <!ELEMENT name (child)*> Creates an element with a child which may appear zero or more times
  • 33. Declaring Attributes in a DTD General form <!ATTLIST Target-element name Type Default> Target-element is the element to which the attribute applies Name is the attribute name type is what type of data the attribute contains Default is whether the item is required
  • 34. Attribute-type can be one of the following Type Description CDATA The value is character data (en1|en2|..) The value must be one from an enumerated list ID The value is a unique id IDREF The value is the id of another element IDREFS The value is a list of other ids NMTOKEN The value is a valid xml name NMTOKENS The value is a list of valid xml names ENTITY The value is an entity ENTITIES The value is a list of entities NOTATION The value is a name of a notation xml The value is a predefined xml value
  • 35. Default-value can be one of the following Value Explanation value The default value of the attribute #REQUIRED The attribute is required #IMPLIED The attribute is not required #FIXED value The attribute value is fixed
  • 36. Example <?xml version="1.0"?> <!DOCTYPE Parts [ <!ELEMENT Parts (Title?, Part*)> <!ELEMENT Title (#PCDATA)> <!ELEMENT Part (Item, Manufacturer, Model, Cost)+> <!ATTLIST Parttype (Computer|Auto|Airplane) #IMPLIED> <!ELEMENT Item (#PCDATA)> <!ELEMENT Manufacturer (#PCDATA)> <!ELEMENT Model (#PCDATA)> <!ELEMENT Cost (#PCDATA)> ]>
  • 37. Example cont.. <Parts> <Title>Main Heading</Title> <Part type="Computer"> <Item></Item> <Manufacture></Manufacture> <Model></Model> <Cost></Cost> </Part> </Parts>
  • 38. XML-Entities An entity is a name that represents a special character, additional text or a file. There are two kinds of entities  General entities  Parameter entities
  • 39. XML Predefined Entities Entity Name Replacement as Text &lt; < &gt; > &amp; & &apos; ‘ &quot; “
  • 40. XML-Entities cont.. General entities: Used in the context of documents. References to general entities start with & and end with; Parameter entities: Used in a document’s DTD. References to parameter entities start with % and end with;
  • 41. Example <?xml version="1.0"?> <!DOCTYPE Film [ <!ENTITY COM "Comedy"> <!ENTITY SF "Science Fiction"> <!ELEMENT Film (Title+, Genre, Year)> <!ELEMENT Title (#PCDATA)> <!ELEMENT Genre (#PCDATA)> <!ELEMENT Year (#PCDATA)> ]> <Film> <Title id="1">Tootsie</Title> <Genre>&COM;</Genre> <Year>1982</Year> <Title Id="2">Jurassic Park</Title> <Genre>&SF;</Genre> <Year>1993</Year> </Film>
  • 42. DTD Classification  Internal document type definition (DTD)  External document type definition (DTD)
  • 43. Internal DTD If a DTD is used only by a single XML document, it can be put directly in that document. Syntax <! DOCTYPE Root-Element [DTD Specification]>
  • 44. Example <?xml version="1.0"?> <!DOCTYPE Note [ <!ELEMENT Note (To, From, Heading, Body)> <!ELEMENT To (#PCDATA)> <!ELEMENT From (#PCDATA)> <!ELEMENT Heading (#PCDATA)> <!ELEMENT Body (#PCDATA)> ]> <Note> <To>Data1</To> <From>Data2</From> <Heading>Reminder</Heading> <Body>Don't Forget Me This Weekend</Body> </Note>
  • 45. External DTD External DTD is one that resides in a separate document. It refers saving the DTD as a separate file with extension .dtd and then referencing the DTD file within the XML document. Syntax <! DOCTYPE Root-Element SYSTEM "File-Name">
  • 46. Example <?xml version="1.0"?> <!DOCTYPE note SYSTEM "note.dtd"> <note> <to>Data1</to> <from>Data2</from> <heading>Reminder</heading> <body>Don't forget me this weekend!</body> </note> And this is the file "note.dtd" which contains the DTD <!ELEMENT note (to, from, heading, body)> <!ELEMENT to (#PCDATA)> <!ELEMENT from (#PCDATA)> <!ELEMENT heading (#PCDATA)> <!ELEMENT body (#PCDATA)>
  • 47. What's wrong with DTD?  DTD’s use old SGML style definitions  DTD are not written in XML  Only defaults for attributes, not for elements  No support for Namespaces
  • 48. XML Schema XML definition system developed to replace Document Type Definitions (DTD)
  • 49. XML schema language specification shall  Be prepared quickly.  Be precise, concise, human-readable.
  • 50. Formatting XML using CSS What is CSS?  CSS stands for Cascading Style Sheets.  Styles define how to display (XML,HTML)elements.  External Style Sheets can save a lot of work.  External Style Sheets are stored in CSS files.
  • 51. XML and CSS XML and CSS simplify document creation. CSS, on the other hand, makes it possible to present that document in a browser.
  • 52. Example <?xml version=“1.0”?> <?xml-stylesheet type="text/CSS" href="tutorials.CSS"?> <tutorials> <tutorial> <name>xml Tutorial</name> <url>www.testport.com</url> </tutorial> <tutorial> <name>HTML Tutorial</name> <url>www.Test IT Solutions.com</url> </tutorial> </tutorials>
  • 53. CSS File Tutorials { Margin: 10px; Background-color: #ccff00; Font-family: veranda, Helvetica, sans-serif; } Name { Display: block; Font-weight: bold; } url { Display: block; Color: #636363; Font-size: small; Font-style: Italic; }
  • 54. Formatting XML using XSLT What is XSLT?  Stands for XSL Transformations  Most important part of XSL  Transforms an XML document into another XML document  Uses XPath to navigate in xml documents  W3C Recommendation.
  • 55. How Does it Work?
  • 56. XSLT uses XPath to define parts of the source document that should match one or more predefined templates. When a match is found, XSLT will transform the matching part of the source document into the result document.
  • 57. XML Technologies What Is XHTML?  Stands for Extensible Hypertext Markup Language  Almost identical to HTML 4.01  Stricter and cleaner version of HTML  Defined as an XML application  W3C Recommendation
  • 58. XHTML – Why?  Combination of HTML and XML  Consists of all the elements in HTML ,Combined with the strict syntax of XML
  • 59. What is XSL? XSL stands for Extensible Style Sheet Language. The World Wide Web Consortium (W3C) started to develop XSL because there was a need for an XML-based Style sheet Language.
  • 60. XSL consists of three parts  XSLT - A language for transforming XML documents  XPath – A language for navigating in XML documents  XSL-FO - A language for formatting XML documents
  • 61. Comparing CSS and XSLT CSS XSLT Simple to use, and suitable for Complex to use simple documents Can’t reorder, add, delete or Can re order, add, delete perform operations on elements elements Uses less memory Uses more memory and processor power Does not use XML syntax Follows the XML syntax
  • 62. Other Related Technologies  CSS - Cascading Style Sheets for display.  XSL - Extensible Style sheet Language for display.  XSLT - XSL Transformations.  Xpath - Allows XML files to include other content.  Xlink - Allows XML files to link to other XML files.  Xquery - Allows XML files to query databases.
  • 63. Conclusion  XML is a self-descriptive language  XML is a powerful language to describe structure data for web application  XML is currently applied in many fields  Many vendors already supports or will support XML