The XML Primer for Techies (The Technology Behind the Power)

This primer is aimed at people who want a place to start learning the technical aspects of XML. It offers definitions and links to outside tutorials about:

  • XML
  • Document Type Definitions (DTDs)
  • XML Schema
  • XSL and XSLT
  • XPath, XLink and XPointer

All chapters can be viewed separately to the right in the block, or from the bottom of each page in sequence.

Tech Library: 

XML

What is XML?

Extensible Markup Language (XML) does one thing, describe data. Rather than place data in a table or create it simply for display, XML sets it up to be used by others. Case Management Systems read in XML to add to their database. Internet sites search XML files to locate documents and web pages. How the user would like to manipulate or manage data is left to which software they would like to use. Sharing documents via XML is made possible by the protocol’s simple text based design and extensible format.

 

XML Tutorials

XML Tutorial, W3Schools.com - W3 School does a good job of walking the user through basic XML syntax. It does require a basic understanding of html to follow how XML works, and the peripheral topics are separated into their own tutorials.

 

Understanding XML and the Java XML APIs - W3 breaks down each standard into a separate tutorial, while Sun combines the many concepts into a single walk through.

 

The XML FAQ - This source is good if you have a few questions about XML, but don’t want to dive into learning the language.

 

 

XML Application Examples

Weather XML Data Feed - The Weather Channel provides an XML feed to update sites to the current weather in your area.

 

xmlLegal.org - They are an education, consulting, research and development organization aimed at increasing knowledge, development, and use of legal XML and related technologies in commerce and the legal industry. Their site is great for XML examples in contracts, court documents, etc. They do require that users apply for free membership to look at their files.

 

LegalXML - They bring legal and technical experts into a common forum to create standards for the electronic exchange of legal data. They have links for schema involving many different data transfers.

 

XML- eXtensible Markup Language: GIS Lounge - This listing identifies some of the modified XML standards for various Geographic Information Systems (GIS).

 

ArcXML Programmer’s Reference Guide - ArcXML is the protocol for using XML in ESRI’s ArcGIS.

 

David Silverlights XMLPitstop.com - A comprehensive site devoted to everything XML. There are listings for tutorials, blogs, discussions, and many XML applications.

 

 

Document Type Definiton (DTD) and XML Schema

What is a Document Type Definition (DTD)?

A DTD defines what elements and attributes are legal inside an XML document. The strength of a DTD is that it describes a standard for XML documents and what elements should be inside them. Different organizations can share the same DTD so that the XML will work for each side. When XML is transferred from one system to another, elements must match the ones on the new system or software applications won’t work. This differs from html; browsers can display files containing multiple errors, but that is not the case with XML. Choosing a DTD allows an XML file to be validated and ensured that it is operational.

 

DTDs can distinguish which data will be parsed for tags inside the elements, but ensuring that elements contain particular data types means a more advanced approach is necessary. The alternative to DTDs are schemas, which let elements be bound to certain data types. More information on schemas is found below. DTDs are less complicated than schemas, which makes them a good option if data types are unknown or do not matter. A survey requiring only user input is an example where a DTD would be much quicker to create than a schema.

 

DTD Tutorials

W3Schools DTD Tutorial

XML DTD - An Introduction to XML Document Type Definitions

Document Type Definition - Here is an excellent tutorial focusing on DTD syntax. It doesn’t offer much at the conceptual level, but is very useful for understanding entities, parameters, elements, and other programming concepts.

DTD Tutorial

 

 

What is an XML Schema?

Schemas are similar to DTD, but provide hard limitations on what data can be placed in each element. If an element must contain only dates, Boolean values, or integers, a schema is ideal.

 

Schema Tutorials

W3Schools XML Schema Tutorial

Liquid Technologies XSD Tutorial

Using XML Schema (Power Point Presentation)

Extensible Stylesheet Language (XSL)

What is XSL and XSLT?

 

Extensible Stylesheet Language (XSL) describes how to display or manipulate an XML document. What does that mean? XSL works similar to how CSS works for HTML documents. By using a template, XSL can manage how a program formats and displays an XML file. Elements can be arranged into tables. An XML file using one schema can be made into an XML file using another.

 

The Extensible Stylesheet Language Transformation (XSLT) can transform XML into XHTML, thereby letting XML data be displayed in any internet browser. XSLT uses XPath to locate information within elements and then depending on the XSLT template, displays or modifies the values accordingly.

 

XSLT Tutorials

 

W3Schools XSLT Tutorial - W3 always provides a good starting place for anyone wanting to learn XSLT.

Top XML's XSLT & XPath Tutorial

Working with XML: Part IV Using XSLT

Using XSLT and XPath (Power Point Presentation) - Xfront provides a tutorial for download. They offer a PowerPoint presentation that provides good examples of useful things done by XSLT

Quick and dirty XSLT Tutorial - A good, quick, tutorial for anyone who wants to jump right into the coding.

XPath, XLink, and XPointer

What is XPath?

X-Path is a language designed to point to elements, attributes and other data inside an XML document. XSLT, and XLink all use XPath to interact with XML. What makes XPath useful is it is the language for examining data directly inside an XML file. It can search elements like a Query language or go to a precise location. For example, in an XML catalog at a library, you could return all the novels by a certain author, or locate a single copy with the library id number.

 

XPath Tutorials

W3School's XPath Tutorial

XML in a Nutshell: Chapter 9 XPath

XPath Tutorial

Learn XSL & XPath Tutorial - A nice tutorial devoted to XSL and using XPath

 

What is XLink?

XLink is the recommend standard on how to declare hyperlinks in XML. In html the tags are set in stone, so a browser can recognize all hyperlinks. Since elements can have an unlimited number of names, XLink provides a solution for doing this. Once an XML file has the XLink namespace, which declares its use in the XML file, any element can be made into a hyperlink with little more difficulty than adding an attribute to an element.

 

What is XPointer?

Like XLink, XPointer hyperlinks to an XML document, but involves using XPath expressions to point inside the document. XPath provides XPointer with the capability to focus in on a specific element within the XML file.

 

XLink and XPointer Tutorials

W3School's XLink and XPointer Tutorial