Free Trial

Safari Books Online is a digital library providing on-demand subscription access to thousands of learning resources.


  • Create BookmarkCreate Bookmark
  • Create Note or TagCreate Note or Tag
  • DownloadDownload
  • PrintPrint
Share this Page URL
Help

Chapter 9 Text Files, Data Tables, and XML > Using XML for Data Exchange

USING XML FOR DATA EXCHANGE

Having looked at plain text files as a way to manage freeform, unorganized data and SQLite as a way to manage the most structured data, we can turn our attention to a third alternative: XML files. XML, Extensible Markup Language, is a way to manage organized data while allowing us to create our own structure to suit our purpose. For instance, anything from a document to an RSS feed to a web commerce site is structured with XML. What separates XML from an SQL data table is that the XML file is plain text. No database management overhead is needed. Because of this, we don’t have to worry about exchanging data between incompatible database management systems; we can convert data from one system to XML, and convert back at the other end. The catch to using XML format is that the documents have to be structurally perfect, or as they say in XML-ese, well-formed. That means that all the tags have to be in perfect pairs, with perfect placement. Whole textbooks are written on XML alone; it is not my intent to teach XML coding here. I will, however, give you examples of how to process XML files you encounter.


  

You are currently reading a PREVIEW of this book.

                                                                                        

Get instant access to over
$1 million worth of books and videos.

  

Start a Free Trial