XML

368 views

Published on

Published in: Technology
0 Comments
0 Likes
Statistics
Notes
  • Be the first to comment

  • Be the first to like this

No Downloads
Views
Total views
368
On SlideShare
0
From Embeds
0
Number of Embeds
1
Actions
Shares
0
Downloads
3
Comments
0
Likes
0
Embeds 0
No embeds

No notes for slide

XML

  1. 1. Anu. S anusdhar4@gmail.com www.facebook.com/AnuSasidharan twitter.com/username in.linkedin.com/in/profilename XML
  2. 2. 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
  3. 3. INTRODUCTION XML Vs HTML ATTRIBUTES AND ELEMENTS SYNTAX RULES NAMING RULES BENEFITS EXAMPLE
  4. 4. INTRODUCTION 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;
  5. 5. INTRODUCTION XML : Extensible Markup Language XML was designed for how to store data XML tags are defined by user
  6. 6. How is XML different from HTML Let us take an example to illustrate this: HTML: <b>visualbuilder.com webmaster@visualbuilder.com</b> XML: <site> <sitename>visualbuilder.com</sitename> <emailaddress>webmaster@visualbuilder.com</emailaddress> </site>
  7. 7. XML – ELEMENTS AND ATTRIBUTES Consider the example: <customer gender=“male”> <firstname>John</firstname> <lastname>Smith</lastname> </customer> contents attribute element
  8. 8. XML -Declaration Syntax XML Declaration specifies: XML version : version used. Encoding : designates the language used. Standalone : requires document type definition or not is specified. Syntax: <?xml version=“ ” encoding=“ ” standalone=“ ” ?>1.0 iso-8859-1 yes
  9. 9. 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 character. Names must not start with letters xml(or XML or Xml etc). Names cannot contain spaces.
  10. 10. 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.
  11. 11. EXAMPLE <AuTo> <make manufacturer=“GM”>Chevrolet</make> <model>Corvette</model> <year>1967</year> <photo/> <colour>Red</colour> </AuTo> Root element Attribute value is quoted Empty tag closed Case sensitive, Proper nesting, Opening tag ends with closing tag
  12. 12. BENEFITS XML can be used to share data. XML can be used to store data. Makes data more useful
  13. 13. EXAMPLE OF A SIMPLE XML PROGRAM <?xml version="1.0" encoding="UTF-8" ?> <customers> <name>Fred</name> <street>123 Main Street</street> <city>Lansing</city> <state>MI</state> <zip>48901</zip> <phone>517-123-4567</phone> </customers>
  14. 14. OUTPUT
  15. 15. THANK YOU...
  16. 16. 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 @ baabtra.com 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.
  17. 17. 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
  18. 18. Contact Us Emarald Mall (Big Bazar Building) Mavoor Road, Kozhikode, Kerala, India. Ph: + 91 – 495 40 25 550 NC Complex, Near Bus Stand Mukkam, Kozhikode, Kerala, India. Ph: + 91 – 495 40 25 550 Cafit Square, Hilite Business Park, Near Pantheerankavu, Kozhikode Start up Village Eranakulam, Kerala, India. Email: info@baabtra.com

×