XML

Markup for arbitrary structured data.

XML is taught here in 14 lessons, running from XML syntax and well-formedness through to JSON or XML today: migration and coexistence. Each lesson takes one topic, shows the working code, and links onward to the next, so the course can be read straight through in order.

TrackXML & Web Services
Lessons14
LevelBeginner to intermediate
Reading timeabout 3 hours
PrerequisitesNone beyond being able to open a text editor

Lessons

  1. XML syntax and well-formednessElements, attributes, entities and CDATA, plus the exact rules a document must satisfy to be well-formed.
  2. NamespacesHow URIs disambiguate element names, how default and prefixed namespaces differ, and the attribute trap that breaks XPath queries.
  3. Validation with DTD and XSDWhat DTDs and XSDs can express, how to write a usable schema, and when XML is still the right choice today.
  4. Attributes vs child elements: modelling decisionsWhen data belongs in an attribute, why attributes cannot repeat or nest, how mixed content changes the rules, and a review of a small schema design.
  5. XML in configuration filesMaven POM, Spring beans, Android layouts, .NET config and Log4j2 — what XML config does well, where it becomes painful, and how to decide between XML and a newer format.
  6. XML Schema in practice: reuse and evolutionComplex type extension and restriction, named groups and attribute groups, include versus import, and how to version a schema so old readers keep working.
  7. Parsing XML in code: DOM, SAX and pull parsersTree versus streaming models, how a SAX handler works, why a pull parser is usually the better streaming choice, and how to pick by document size.
  8. XML in Python, Java and JavaScriptElementTree and lxml, JAXP and JAXB, DOMParser and XMLSerializer in the browser, and the namespace-aware versus namespace-ignorant API split that causes most confusion.
  9. Transforming XML with XSLT templatesHow a stylesheet is structured, template matching and apply-templates, choosing an output method, and reshaping one vocabulary into another with identity transforms.
  10. RSS, Atom and web feedsFeed structure and required elements, item versus entry fields, the date and identifier rules that decide whether a reader shows your post once or twice, and how to validate a feed.
  11. SVG, XHTML and XML in the browserInline SVG as real XML, XHTML strictness and the XML parsing mode, foreignObject for mixing vocabularies, and the namespace serialisation pitfalls that break rendering.
  12. SOAP, WSDL and legacy web servicesThe envelope and header structure, how a WSDL describes a contract, SOAP faults, the 1.1 versus 1.2 differences, and when a SOAP integration is still the right answer.
  13. XML security: XXE and entity expansionHow an external entity reads a local file or makes a request, billion laughs and quadratic blowup, the parser settings that stop both, and the other XML-specific limits worth setting.
  14. JSON or XML today: migration and coexistenceHow the data models differ, what has no JSON equivalent, converting between the formats without losing meaning, and a checklist for running both behind one API.

More in XML & Web Services

XPath XSLT SOAP RESTful APIs RSS & Atom

FAQ

How long does the XML course take?
It has 14 lessons, about 3 hours of reading. Expect roughly twice that if you type out and run every example.
Do I need prior experience for XML?
No. This is the first course in XML & Web Services, so it starts from the beginning and assumes no background.
What should I read after XML?
Continue with XPath (14 lessons), the next course in XML & Web Services.