Core Foundation XML Services

Extensible Markup Language, or XML, is a method for putting structured data in a text file. The structured data you want to represent using XML can be virtually anything--address books, configuration parameters, spreadsheets, Web pages, financial transactions, technical drawings, and so on. XML is a set of rules for designing text formats for such data. By storing data in a structured text format, XML allows you to look at data without the program that produced it. XML files are easy for computers to generate and read, they are unambiguous, and they avoid common pitfalls of text data formats, such as lack of extensibility, lack of support for internationalization and localization, and platform dependency.

Core Foundation XML Services provides an XML parser you can use to read and extract data from XML documents. XML Services provides two APIs with which to access the parser. A high-level API converts XML data into the Core Foundation collection CFXMLTree, and a low-level callback-based API allows you to perform any action you wish on each XML structure as it is encountered by the parser. This chapter provides a brief introduction to XML and goes on to describe both of the XML Services parser APIs in detail.

XML is a complex topic whose thorough treatment is beyond the scope of this document. Developers new to XML concepts can find the XML 1.0 specification and supporting material at the website maintained by the World Wide Web Consortium at http://www.w3c.org/XML. The Organization for the Advancement of Structured Information Standards hosts two excellent sites on XML at http://www.xml.org/ and http://www.oasis-open.org/cover/. There is also a great deal of information about XML and its various uses at the following corporate sites: http://www.ibm.com/developer/xml/, http://msdn.microsoft.com/xml/default.asp, and http://java.sun.com/xml/.

Header Files:

CFXMLNode.h

CFXMLParser.h

Core Foundation XML Services Concepts

Core Foundation XML Services Tasks


© 2000 Apple Computer, Inc. (Last Updated 14 July 2000)