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

Published in: Technology, News & Politics
  • Be the first to comment

  • Be the first to like this


  1. 1. Yasirmusthafa pp 8891396749 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. What is XML ?? • EXtensible Markup Language • Markup language much like HTML • Designed to describe data • Xml tags are not predefined
  4. 4. Example <?xml version="1.0"?> <person> <name> <firstname>Paul</firstname> <lastname>McCartney</lastname> </name> <job>Singer</job> <gender>Male</gender> </person>
  5. 5. Difference b/w XML&HTML XML HTML XML was designed to describe data and to focus on what data is. HTML was designed to display data and to focus on how data looks. XML allows the author to define his own tags The tags used to markup HTML documents and the structure of HTML documents are predefined
  6. 6. Rules • All xml elements must have a closing tag • Xml tags are case sensitive • All xml elements must be properly nested • All xml documents must have a root tag • Attribute values must always be quoted
  7. 7. Usages • XML can keep data separated from your HTML • XML can be used to store data inside HTML documents(Data Island) • XML can be used as a format to exchange information • XML can be used to store data in files or in databases
  8. 8. Data Island • <!DOCTYPE html> • <html> • <head> • <title>XML Data Block Demo</title> • <!-- this is the data block which contains the XML data --> • <script id="purchase-order" type="application/xml"> • <purchaseOrder xmlns=""> • <lineItem> • <name>Line Item 1</name> • <price>1.25</price> • </lineItem> • <lineItem> • <name>Line Item 2</name> • <price>2.48</price> • </lineItem> • </purchaseOrder> • </script> • <script> • function runDemo() { • // the raw XML data can be retrieved using this... • var orderSource = document.getElementById("purchase-order").textContent;
  9. 9. // the XML data can be parsed into a DOM tree using the DOMParser API... var parser = new DOMParser(); var doc = parser.parseFromString(orderSource, "application/xml"); var lineItems = doc.getElementsByTagNameNS("", "lineItem"); var firstPrice = lineItems[0].getElementsByTagNameNS("", "price")[0].textContent; document.body.textContent = "The purchase order contains " + lineItems.length + " line items. The price of the first line item is " + firstPrice + "."; } </script> </head> <body onload="runDemo()";> Demo did not run </body> </html>
  10. 10. Web services 1. SOAP 2. WSDL 3. UDDI
  11. 11. A real world example-weather telecasting • RDF(resource description framework) o Framework for writing xml based languages to describe information on the web • RSS o Implementation of RDF o Website publishers can use RSS to make content available as a “feed”, so that web users can access some of their contents without actually visiting their site.
  12. 12. THANK YOU
  13. 13. 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.
  14. 14. Follow us @ Like us @ Subscribe to us @ Become a follower @ Connect to us @ Give a feedback @ Thanks in advance | |
  15. 15. 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: Contact Us