SlideShare a Scribd company logo
XML Fundamentals
Your company tagline
70s Big headache
During 70's big companies make a lot
of integrations among them using flat
files.
The solution
How to know what is the data type?
1
The solution
Report relational data (master detail)
2
The companies had to build hugh
validators and loading process.
3
IBM invented GML (generic markup
language) and ISO adopted as SGML then
this standard was the base to define HTML
and many developers adopted it as a
exchange language.
XML stands for EXtensible Markup Language
XML is a markup language much like HTML
XML was designed to store and transport data
XML was designed to be self-descriptive
XML is a W3C Recommendation
What is XML?
It is based on tags related by nodes in a hierarchical way
XML Simplifies things
Data Sharing Data Transport Platform Changes Data Availability
XML Syntax
Must have a root element
XML Prolog
<?xml version="1.0" encoding="UTF-8"?>
All XML Elements must have a closing tag
<p>This is a paragraph.</p>
<br />
The tags elements are case sensitive
<table></table>
<Table></Table>
The tag elements must be properly nested
Incorrect
<b><i>This text is bold and italic</b></i>
Correct
<b><i>This text is bold and italic</i></b>
The attribute Values must be quoted
incorrect
<note date=12/11/2007>
<to>Tove</to>
<from>Jani</from>
</note>
Correct
<note date="12/11/2007">
<to>Tove</to>
<from>Jani</from>
</note>
Comments in XML
<!-- This is a comment -->
If the xml accomplish with these
rules the xml is well formed.
XML Element Text
Attributes
Other Element
Also a combination
XML Namespaces
<table>
<tr>
<td>Apples</td>
<td>Bananas</td>
</tr>
</table>
<table>
<name>African
Coffee Table</name>
<width>80</width>
<length>120</length>
</table>
Adding a prefix
<h:table>
<h:tr>
<h:td>Apples</h:td>
<h:td>Bananas</h:td>
</h:tr>
</h:table>
How to define the prefix?
<h:table
xmlns:h="http://www.w3.org/TR/html4/">
<h:tr>
<h:td>Apples</h:td>
<h:td>Bananas</h:td>
</h:tr>
</h:table>
How to constraint the data and
validate the XML Content?
Using a Xml Schema Definition File (XSD) or a Data Type
Definition file DTD
The most used is the XSD.
<?xml version="1.0" encoding="UTF-8" ?>
<xs:schema
xmlns:xs="http://www.w3.org/2001/XMLSchema">
...
</xs:schema>
We will start with the standard XML declaration followed by the xs:schema
element that defines a schema:
XSD describe the elements and attributes that an xml could
use.
It can be defined three kind of data types and with these
definitions the elements will be composed.
● Attribute
● Simple Type
● Complex Type
Attribute
<xs:attribute name="xxx" type="yyy"/>
<xs:attribute name="lang" type="xs:string" default="EN"/>
<xs:attribute name="lang" type="xs:string" use="required"/>
Simple Type
<xs:element name="idElement" type="id"/>
<xs:simpleType name="id">
<xs:restriction base="xs:integer">
<xs:minInclusive value="0"/>
<xs:maxInclusive value="100"/>
</xs:restriction>
</xs:simpleType>
Complex Type
<xs:element name="note" type="noteType"/>
<xs:complexType name="noteType" >
<xs:sequence>
<xs:element name="to" type="xs:string"/>
<xs:element name="from" type="xs:string"/>
<xs:element name="heading" type="xs:string"/>
<xs:element name="body" type="xs:string"/>
</xs:sequence>
</xs:complexType>
Commons Data types
xs:string
xs:decimal
xs:integer
xs:boolean
xs:date
xs:time
Restrictions of Values
<xs:element name="age">
<xs:simpleType>
<xs:restriction base="xs:integer">
<xs:minInclusive value="0"/>
<xs:maxInclusive value="120"/>
</xs:restriction>
</xs:simpleType>
</xs:element>
Set of Values
<xs:element name="car">
<xs:simpleType>
<xs:restriction base="xs:string">
<xs:enumeration value="Audi"/>
<xs:enumeration value="Golf"/>
<xs:enumeration value="BMW"/>
</xs:restriction>
</xs:simpleType>
</xs:element>
Using REGEXP
<xs:element name="letter">
<xs:simpleType>
<xs:restriction base="xs:string">
<xs:pattern value="[a-z]"/>
</xs:restriction>
</xs:simpleType>
</xs:element>
Restriction of Length
<xs:element name="password">
<xs:simpleType>
<xs:restriction base="xs:string">
<xs:length value="8"/>
</xs:restriction>
</xs:simpleType>
</xs:element>
How to process it?
DOM
Using the Document Object Model that
process the xml file as a tree structure
this method is used by HTML
The understanding and handling the xml
with this method could be easier but add
an overhead.
DOM Properties
These are some typical DOM properties:
* x.nodeName - the name of x
* x.nodeValue - the value of x
* x.parentNode - the parent node of x
* x.childNodes - the child nodes of x
* x.attributes - the attributes nodes of x
DOM Methods
● x.getElementsByTagName(name) - get all elements with a specified
tag name
● x.appendChild(node) - insert a child node to x
● x.removeChild(node) - remove a child node from x
SAXSimple API for XML is an algorithm
alternative to process a xml file sequentiality
this method could be faster but depend on
some events so could be more difficult to
manage.
Andres Felipe Rincon
PMP, TOGAF

More Related Content

What's hot (19)

PPT
Xml schema
Harry Potter
 
PDF
Xsd tutorial
Ashoka Vanjare
 
PPT
XML Schema
yht4ever
 
PPTX
XML's validation - XML Schema
videde_group
 
PPT
XSD
Kunal Gaind
 
PPTX
Publishing xml
Kumar
 
PPT
XML/XSLT
thinkahead.net
 
PPTX
Web programming xml
Uma mohan
 
PDF
Xml schema
Prabhakaran V M
 
PPTX
fundamentals of XML
hamsa nandhini
 
PPTX
XML DTD and Schema
hamsa nandhini
 
PPTX
XML, DTD & XSD Overview
Pradeep Rapolu
 
PPTX
Xml
Neeta Sawant
 
PPT
Xml Schema
vikram singh
 
PPTX
Jungahan web presentation
garden8an
 
PPTX
Xml basics
Kumar
 
Xml schema
Harry Potter
 
Xsd tutorial
Ashoka Vanjare
 
XML Schema
yht4ever
 
XML's validation - XML Schema
videde_group
 
Publishing xml
Kumar
 
XML/XSLT
thinkahead.net
 
Web programming xml
Uma mohan
 
Xml schema
Prabhakaran V M
 
fundamentals of XML
hamsa nandhini
 
XML DTD and Schema
hamsa nandhini
 
XML, DTD & XSD Overview
Pradeep Rapolu
 
Xml Schema
vikram singh
 
Jungahan web presentation
garden8an
 
Xml basics
Kumar
 

Viewers also liked (15)

PPTX
Unit 1
Disha Bhatia
 
PPTX
ADO .NET by Sonu Vishwakarma
Sonu Vishwakarma
 
PPT
Organizational behavior learning
Perinpanathan Rajkumar
 
PDF
Advanced Asp.Net Concepts And Constructs
Manny Siddiqui MCS, MBA, PMP
 
PDF
Asp.Net 3 5 Part 1
asim78
 
PPT
Unit 1
swapnasalil
 
PPT
Distributed computing
Alokeparna Choudhury
 
PPT
Intro, personality, attitude edited
aakash mehra
 
PDF
Chapter 1 - Multimedia Fundamentals
Pratik Pradhan
 
PDF
Web Services (SOAP, WSDL, UDDI)
Peter R. Egli
 
PPT
Chapter1
Dang Tuan
 
PPTX
Ooad unit – 1 introduction
Babeetha Muruganantham
 
PDF
Organisational behavior
Payal Deep
 
PPT
Organisational behaviour ppt
saransuriyan
 
PPTX
Introduction of Cloud computing
Rkrishna Mishra
 
Unit 1
Disha Bhatia
 
ADO .NET by Sonu Vishwakarma
Sonu Vishwakarma
 
Organizational behavior learning
Perinpanathan Rajkumar
 
Advanced Asp.Net Concepts And Constructs
Manny Siddiqui MCS, MBA, PMP
 
Asp.Net 3 5 Part 1
asim78
 
Unit 1
swapnasalil
 
Distributed computing
Alokeparna Choudhury
 
Intro, personality, attitude edited
aakash mehra
 
Chapter 1 - Multimedia Fundamentals
Pratik Pradhan
 
Web Services (SOAP, WSDL, UDDI)
Peter R. Egli
 
Chapter1
Dang Tuan
 
Ooad unit – 1 introduction
Babeetha Muruganantham
 
Organisational behavior
Payal Deep
 
Organisational behaviour ppt
saransuriyan
 
Introduction of Cloud computing
Rkrishna Mishra
 
Ad

Similar to XML Fundamentals (20)

PPTX
Xml 1
pavishkumarsingh
 
PPTX
Web Service Workshop - 3 days
David Ionut
 
PDF
M.FLORENCE DAYANA WEB DESIGN -Unit 5 XML
Dr.Florence Dayana
 
PPT
Xml Session No 1
Saif Ullah Dar
 
PPTX
Internet_Technology_UNIT V- Introduction to XML.pptx
shilpar780389
 
PPT
XML - EXtensible Markup Language
Reem Alattas
 
PPT
Xml and DTD's
Swati Parmar
 
PPTX
Unit 5 xml (1)
manochitra10
 
PDF
Xml Schema Essentials R Allen Wyke Andrew Watt
qbcznaka519
 
PPTX
XML1.pptx
53ShaikhImadoddin
 
PPT
unit_5_XML data integration database management
sathiyabcsbs
 
PDF
Xml Schema Essentials First Edition R Allen Wyke Andrew Watt
esgarkavos
 
PPT
Xml and Co.
Findik Dervis
 
PDF
XSD Incomplete Overview Draft
Pedro De Almeida
 
PPT
Introduction to XML
yht4ever
 
PPTX
advDBMS_XML.pptx
IreneGetzi
 
PDF
XML Schema.pdf
KGSCSEPSGCT
 
PPTX
XML - Extensible Markup Language for Network Security.pptx
kalanamax
 
PDF
II UNIT PPT NOTES.pdf this is the data structures
PriyankaRamavath3
 
DOCX
paper about xml
عبدالغني الهجار
 
Web Service Workshop - 3 days
David Ionut
 
M.FLORENCE DAYANA WEB DESIGN -Unit 5 XML
Dr.Florence Dayana
 
Xml Session No 1
Saif Ullah Dar
 
Internet_Technology_UNIT V- Introduction to XML.pptx
shilpar780389
 
XML - EXtensible Markup Language
Reem Alattas
 
Xml and DTD's
Swati Parmar
 
Unit 5 xml (1)
manochitra10
 
Xml Schema Essentials R Allen Wyke Andrew Watt
qbcznaka519
 
unit_5_XML data integration database management
sathiyabcsbs
 
Xml Schema Essentials First Edition R Allen Wyke Andrew Watt
esgarkavos
 
Xml and Co.
Findik Dervis
 
XSD Incomplete Overview Draft
Pedro De Almeida
 
Introduction to XML
yht4ever
 
advDBMS_XML.pptx
IreneGetzi
 
XML Schema.pdf
KGSCSEPSGCT
 
XML - Extensible Markup Language for Network Security.pptx
kalanamax
 
II UNIT PPT NOTES.pdf this is the data structures
PriyankaRamavath3
 
Ad

Recently uploaded (20)

PDF
Alexander Marshalov - How to use AI Assistants with your Monitoring system Q2...
VictoriaMetrics
 
PDF
Why Businesses Are Switching to Open Source Alternatives to Crystal Reports.pdf
Varsha Nayak
 
PDF
Linux Certificate of Completion - LabEx Certificate
VICTOR MAESTRE RAMIREZ
 
PDF
Automate Cybersecurity Tasks with Python
VICTOR MAESTRE RAMIREZ
 
PPTX
Hardware(Central Processing Unit ) CU and ALU
RizwanaKalsoom2
 
PPTX
Empowering Asian Contributions: The Rise of Regional User Groups in Open Sour...
Shane Coughlan
 
PPTX
OpenChain @ OSS NA - In From the Cold: Open Source as Part of Mainstream Soft...
Shane Coughlan
 
PDF
IDM Crack with Internet Download Manager 6.42 Build 43 with Patch Latest 2025
bashirkhan333g
 
PDF
vMix Pro 28.0.0.42 Download vMix Registration key Bundle
kulindacore
 
PDF
Empower Your Tech Vision- Why Businesses Prefer to Hire Remote Developers fro...
logixshapers59
 
PPTX
Tally software_Introduction_Presentation
AditiBansal54083
 
PDF
[Solution] Why Choose the VeryPDF DRM Protector Custom-Built Solution for You...
Lingwen1998
 
PDF
Odoo CRM vs Zoho CRM: Honest Comparison 2025
Odiware Technologies Private Limited
 
PDF
TheFutureIsDynamic-BoxLang witch Luis Majano.pdf
Ortus Solutions, Corp
 
PDF
4K Video Downloader Plus Pro Crack for MacOS New Download 2025
bashirkhan333g
 
PPTX
Agentic Automation: Build & Deploy Your First UiPath Agent
klpathrudu
 
PDF
Build It, Buy It, or Already Got It? Make Smarter Martech Decisions
bbedford2
 
PDF
Unlock Efficiency with Insurance Policy Administration Systems
Insurance Tech Services
 
PPTX
AEM User Group: India Chapter Kickoff Meeting
jennaf3
 
PPTX
Change Common Properties in IBM SPSS Statistics Version 31.pptx
Version 1 Analytics
 
Alexander Marshalov - How to use AI Assistants with your Monitoring system Q2...
VictoriaMetrics
 
Why Businesses Are Switching to Open Source Alternatives to Crystal Reports.pdf
Varsha Nayak
 
Linux Certificate of Completion - LabEx Certificate
VICTOR MAESTRE RAMIREZ
 
Automate Cybersecurity Tasks with Python
VICTOR MAESTRE RAMIREZ
 
Hardware(Central Processing Unit ) CU and ALU
RizwanaKalsoom2
 
Empowering Asian Contributions: The Rise of Regional User Groups in Open Sour...
Shane Coughlan
 
OpenChain @ OSS NA - In From the Cold: Open Source as Part of Mainstream Soft...
Shane Coughlan
 
IDM Crack with Internet Download Manager 6.42 Build 43 with Patch Latest 2025
bashirkhan333g
 
vMix Pro 28.0.0.42 Download vMix Registration key Bundle
kulindacore
 
Empower Your Tech Vision- Why Businesses Prefer to Hire Remote Developers fro...
logixshapers59
 
Tally software_Introduction_Presentation
AditiBansal54083
 
[Solution] Why Choose the VeryPDF DRM Protector Custom-Built Solution for You...
Lingwen1998
 
Odoo CRM vs Zoho CRM: Honest Comparison 2025
Odiware Technologies Private Limited
 
TheFutureIsDynamic-BoxLang witch Luis Majano.pdf
Ortus Solutions, Corp
 
4K Video Downloader Plus Pro Crack for MacOS New Download 2025
bashirkhan333g
 
Agentic Automation: Build & Deploy Your First UiPath Agent
klpathrudu
 
Build It, Buy It, or Already Got It? Make Smarter Martech Decisions
bbedford2
 
Unlock Efficiency with Insurance Policy Administration Systems
Insurance Tech Services
 
AEM User Group: India Chapter Kickoff Meeting
jennaf3
 
Change Common Properties in IBM SPSS Statistics Version 31.pptx
Version 1 Analytics
 

XML Fundamentals

Editor's Notes

  • #11: t simplifies data sharing: b/c abstracts the differences between operating systems and formalize the message format, It simplifies data transport: could be stored as a flat file and could be send as an string for many protocols, there are also specific protocols designed to shared this kind of format information It simplifies platform changes: b/c the message is easier to expand or upgrade to new operating systems, new applications, or new browsers, without losing data. It simplifies data availability: it is easy to read for a humans and machines.