05 - XML
05 - XML
Language (XML) /
JSON
Chapter 19
5 Self-Reading: XPATH
6 Self-Reading: XML
Processing
7 Sef-Reading:
Self Reading: XML Style
XML Processing
Transformations
XML OVERVIEW
Randy Connolly and Ricardo Hoar Fundamentals of Web Development
XML Overview
• Developed from SGML
• Became a W3C Recommendations in 1998
• A meta-markup language -> unlike HTML, XML can be used to mark
up any type of data. Tags are not predefined (user generated)
• Deficiencies of HTML and SGML
• Many complex features that are rarely used
• HTML is a markup language, XML is used to define markup languages
• Markup languages defined in XML are known as applications
• XML can be written by hand or generated by computer
• Useful for data exchange
• Foundation for several next-generation web technologies:
• RSS, AJAX, Web Services, etc.
• Tag syntax:
<element attributes> text or tags </element>
• Attribute syntax:
name="value"
• comments:
<!-- comment -->
• Content description specifies what tags may appear inside the named
element and whether there may be any plain text in the content
• EX: <!ELEMENT person (parent+, age, spouse?, sibling*)>
• An element can be either an internal or a leaf node.
• Multiplicity
• +
• *
• ?
• Leaf elements can be:
• #PCDATA
• EMPTY
• ANY
JSON
Randy Connolly and Ricardo Hoar Fundamentals of Web Development
JSON