Disclaimer: This presentation is prepared by trainees of
baabtra as a part of mentoring program. This is not official
document of baabtra –Mentoring Partner
Baabtra-Mentoring Partner is the mentoring division of baabte System Technologies Pvt . Ltd
XML Vs HTML
ATTRIBUTES AND ELEMENTS
What is a markup language....???
Markup languages are designed for the processing,
definition and presentation of text.
The language specifies code for formatting, both
the layout and style, within a text file.
Eg: XML, HTML etc;
XML : Extensible Markup Language
XML was designed for how to store data
XML tags are defined by user
How is XML different from HTML
Let us take an example to illustrate this:
XML – ELEMENTS AND ATTRIBUTES
Consider the example:
XML -Declaration Syntax
XML Declaration specifies:
XML version : version used.
Encoding : designates the language used.
Standalone : requires document type definition or not
<?xml version=“ ” encoding=“ ” standalone=“ ” ?>1.0 iso-8859-1 yes
XML - NAMING RULES
XML elements must follow the below naming rules:
Names can contain letters, numbers, and other characters.
Names must not start with a number or punctuation
Names must not start with letters xml(or XML or Xml etc).
Names cannot contain spaces.
XML - SYNTAX RULES
All XML documents must have a root element
XML is case sensitive.
All XML opening tags must have closing tags.
XML elements must be properly nested.
Attributes values must be quoted.
Empty elements must be closed.
Attribute value is
Empty tag closed
Opening tag ends with closing tag
XML can be used to share data.
XML can be used to store data.
Makes data more useful
EXAMPLE OF A SIMPLE XML PROGRAM
<?xml version="1.0" encoding="UTF-8" ?>
<street>123 Main Street</street>
Want to learn more about programming or Looking to become a good programmer?
Are you wasting time on searching so many contents online?
Do you want to learn things quickly?
Tired of spending huge amount of money to become a Software professional?
Do an online course
We put industry standards to practice. Our structured, activity based courses are so designed
to make a quick, good software professional out of anybody who holds a passion for coding.
Follow us @ twitter.com/baabtra
Like us @ facebook.com/baabtra
Subscribe to us @ youtube.com/baabtra
Become a follower @ slideshare.net/BaabtraMentoringPartner
Connect to us @ in.linkedin.com/in/baabtra
Thanks in advance.
www.baabtra.com | www.massbaab.com |www.baabte.com
Emarald Mall (Big Bazar Building)
Mavoor Road, Kozhikode,
Ph: + 91 – 495 40 25 550
NC Complex, Near Bus Stand
Ph: + 91 – 495 40 25 550
Hilite Business Park,
Start up Village