• XML (and where it took a wrong turn)
• HTML 5 (and why it makes me very, very angry)
• JSON (and why it's not always as useful as you may think)
• YAML (and why it makes my eyes bleed)
"extensible" mostly refers to the Namespaces concept
• XML Schema (validates the grammar of a document)
• RELAX NG (like XML Schema, just full of win)
• Except it's so awesome it sucks at reporting errors :(
• Schematron (validates the semantics of a document)
• DTD (RRRRRRRAAAAAAAAAAAAAAAAAGGGGEEEE)
• XPath and XQuery for querying documents
• XPath is an expression syntax, XQuery a full query language
• XSLT to transform documents to XML, HTML, text, ...
• Makes heavy use of XPath
• Allow re-use of content within and across documents
READING AND WRITING
• Push Parsing, uses events to notify app during parsing
• Example: SAX
• Pull Parsing, allows app to retrieve or skip elements
• Example: PHP's ext/xmlreader
• DOM, constructs an object representation of the tree
• Example: DOM (duh)
• Neither SGML nor XML
• so browser vendors need to write new (inefﬁcient) parsers
• Does not have a DTD anymore
• how could it, given how it's not SGML...
• Completely idiotic stuff like data-* attributes
• And they're even proud of it...
data-‐name="John Resig" data-‐city="Boston"
<b>John says:</b> <span>Hello, how are you?</span>
JSON PROS AND CONS
• Quite efﬁcient, simple, universally supported in many languages
• Very good for serializing objects
• Built-in types, do not need explicit declaration
• No schemas
• No mixed content
This has one newline.
same as "clipped" above: "This has one newline.n"
This has no newline.
same as "stripped" above: "This has no newline."
This has four newlines.
same as "kept" above: "This has four newlines.nnnn"
-‐ &showell Steve
• Makes your eyes bleed
• No schemas or other forms of validation
• Forget a newline somewhere and the parser might look at
you, helpless, like a deer in headlights
• No mixed content
• XML for hypermedia, documents, your new REST API
• JSON for serializing objects and storing them in e.g. CouchDB
• YAML for your conﬁguration ﬁles