Download presentation
Presentation is loading. Please wait.
1
Introduction to Web programming 0731213
2
What is XML? 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
3
How Can XML be Used? XML Separates Data from Presentation
XML does not carry any information about how to be displayed. The same XML data can be used in many different presentation scenarios. Because of this, with XML, there is a full separation between data and presentation. XML is Often a Complement to HTML In many HTML applications, XML is used to store or transport data, while HTML is used to format and display the same data.
4
XML Elements An XML element is everything from (including) the element's start tag to (including) the element's end tag. An element can contain: text attributes other elements or a mix of the above <book category="children"> <title>Harry Potter</title> <author>J K. Rowling</author> <year>2005</year> <price>29.99</price> </book>
5
XML Attributes XML elements can have attributes, just like HTML.
Attributes are designed to contain data related to a specific element XML Attributes Must be Quoted <person gender="female">
6
XML Example <?xml version="1.0" encoding="UTF-8"?> <breakfast_menu> <food> <name>Belgian Waffles</name> <price>$5.95</price> <description> Two of our famous Belgian Waffles with plenty of real maple syrup </description> <calories>650</calories> </food> <food> <name>Strawberry Belgian Waffles</name> <price>$7.95</price> <description> Light Belgian waffles covered with strawberries and whipped cream </description> <calories>900</calories> </food> </breakfast_menu>
7
XML Example Name Price Description Calories Belgian Waffles 5.95
Two of our famous Belgian Waffles with plenty of real maple syrup 650 Strawberry Belgian Waffles 7.95 Light Belgian waffles covered with strawberries and whipped cream 900
8
References https://www.w3schools.com/
Robin Nixon, Learning PHP, MySQL, JavaScript, and CSS, 2013 Mike McGrath, PHP & My SQL in easy steps, 2012.
9
The End
Similar presentations
© 2025 SlidePlayer.com. Inc.
All rights reserved.