Successfully reported this slideshow.
We use your LinkedIn profile and activity data to personalize ads and to show you more relevant ads. You can change your ad preferences anytime.



Published on

  • Be the first to comment

  • Be the first to like this


  1. 1. XML Freddy.pv email/facebook id :
  2. 2. Disclaimer:This presentation is prepared by trainees ofbaabtra as a part of mentoring program. This is not officialdocument of baabtra –Mentoring PartnerBaabtra-Mentoring Partner is the mentoring division of baabte System Technologies Pvt .Ltd
  3. 3. What is XML?• XML stands for EXtensible Markup Language• XML is a markup language much like HTML• XML was designed to carry data, not to display data• XML tags are not predefined. You must define your own tags• XML is designed to be self-descriptive• XML is a W3C Recommendation
  4. 4. The Difference Between XML and HTML• XML is not a replacement for HTML.• XML and HTML were designed with different goals:• XML was designed to transport and store data, with focus on what data is• HTML was designed to display data, with focus on how data looks• HTML is about displaying information, while XML is about carrying information.
  5. 5. XML Does Not DO Anything• <note> <to>Tove</to> <from>Jani</from> <heading>Reminder</heading> <body>Dont forget me this weekend!</body> </note>• this XML document does not DO anything. It is just information wrapped in tags. Someone must write a piece of software to send, receive or display it.
  6. 6. • XML is Not a Replacement for HTML• It is important to understand that XML is not a replacement for HTML. In most web applications, XML is used to transport data, while HTML is used to format and display the data.• XML is a software- and hardware-independent tool for carrying information.• XML is a W3C Recommendation• XML became a W3C Recommendation on February 10, 1998.
  7. 7. XML is Everywhere• XML is now as important for the Web as HTML was to the foundation of the Web.• XML is the most common tool for data transmissions between all sorts of applications.
  8. 8. How Can XML be Used?• XML Separates Data from HTML• XML Simplifies Data Sharing• XML Simplifies Data Transport• XML Simplifies Platform Changes• XML Makes Your Data More Available
  9. 9. XML Tree• XML documents form a tree structure that starts at "the root" and branches to "the leaves“• <?xml version="1.0" encoding="ISO-8859-1"?> <note> <to>Tove</to> <from>Jani</from> <heading>Reminder</heading> <body>Dont forget me this weekend!</body> </note>
  10. 10. • <root> <child> <subchild>.....</subchild> </child> </root>
  11. 11. • <bookstore> <book category="COOKING"> <title lang="en">Everyday Italian</title> <author>Giada De Laurentiis</author> <year>2005</year> <price>30.00</price> </book> <book category="CHILDREN"> <title lang="en">Harry Potter</title> <author>J K. Rowling</author> <year>2005</year> <price>29.99</price> </book> <book category="WEB"> <title lang="en">Learning XML</title> <author>Erik T. Ray</author> <year>2003</year> <price>39.95</price> </book> </bookstore>
  12. 12. XML Syntax Rules• All XML Elements Must Have a Closing Tag• <p>This is a paragraph. <br>• <p>This is a paragraph.</p> <br />
  13. 13. • XML Tags are Case Sensitive<Message>This is incorrect</message> <message>This is correct</message>• XML Elements Must be Properly Nested<b><i>This text is bold and italic</b></i><b><i>This text is bold and italic</i></b>
  14. 14. •XML Documents Must Have a Root Element• <root> <child> <subchild>.....</subchild> </child> </root>• XML Attribute Values Must be Quoted• <note date="12/11/2007"> <to>Tove</to> <from>Jani</from> </note>
  15. 15. Entity References• Some characters have a special meaning in XML.• <message>if salary < 1000 then</message>• <message>if salary &lt; 1000 then</message>• &lt; < less than• &gt; > greaterthan• &amp; & ampersand
  16. 16. XML Elements• An element can contain:• other elements• text• attributes• or a mix of all of the above...
  17. 17. • <bookstore> <book category="CHILDREN"> <title>Harry Potter</title> <author>J K. Rowling</author> <year>2005</year> <price>29.99</price> </book> <book category="WEB"> <title>Learning XML</title> <author>Erik T. Ray</author> <year>2003</year> <price>39.95</price> </book> </bookstore>
  18. 18. XML Naming Rules• XML elements must follow these naming rules:• Names can contain letters, numbers, and other characters• Names cannot start with a number or punctuation character• Names cannot start with the letters xml (or XML, or Xml, etc)• Names cannot contain spaces
  19. 19. • XML Attributes Must be Quoted• <person sex="female">• <person sex=female>• <gangster name=George "Shotgun" Ziegler>
  20. 20. Viewing XML Files• XML documents do not carry information about how to display the data.• XML Files can Display with CSS
  21. 21. Displaying XML with XSLT• XSLT is the recommended style sheet language of XML.• XSLT (eXtensible Stylesheet Language Transformations) is far more sophisticated than CSS.• XSLT can be used to transform XML into HTML, before it is displayed by a browser:
  22. 22. • If this presentation helped you, please visit our page and like it. Thanks in advance.• | |ww