Storing and Retrieving XML Content

Because the XML recommendation makes a point of not dictating how documents must be stored, users are constantly coming up with new ways to use XML for data storage and retrieval.

Text Files

The simplest way to store an XML document is as a normal text file. The file can then be passed to an XML parser for processing, copied, or even served up by a Web server. The only technical issue that may need to be addressed is the character encoding of the file in question. The encoding="..." portion of the <?xml?> declaration is intended to tell an XML parser what character set was used to encode the document in question. By default, the encoding is assumed to be the UTF-8 encoding of Unicode. As long as your document ...

Get Strategic XML now with the O’Reilly learning platform.

O’Reilly members experience books, live events, courses curated by job role, and more from O’Reilly and nearly 200 top publishers.