The XML Family of Standards
XML was specifically designed to combine the flexibility of SGML with the simplicity of Hypertext Markup Language (HTML). HTML, the markup language upon which the World Wide Web is based, is an application of an older and more complex language known as Standard Generalized Markup Language (SGML). SGML was created to provide a standardized language for complex documents, such as airplane repair manuals and parts lists. HTML, on the other hand, was designed for the specific purpose of creating documents that could be displayed by a variety of different web browsers. As such, HTML provides only a subset of SGML’s functionality and is limited to features that make sense in a web browser. XML takes a broader view.
There are several types of tasks you’ll typically want to perform with XML documents. XML documents can be read into arbitrary data structures, manipulated in memory, and written back out as XML. Existing objects can be written (or serialized, to use the technical term) to a number of different XML formats, including ones that you define, as well as standard serialization formats. The technologies most commonly used to perform these operations are the following:
- Input
In order to read an XML Document into memory, you need to read it. There are a variety of XML parsers that can be used to read XML, and I discuss the .NET implementation in Chapter 2.
- Output
After either reading XML in or creating an XML representation in memory, you’ll most likely ...