---
title: Introduction to Event-Driven XML Programming Guide for Cocoa
framework: cocoa
role: article
path: apple-archive/documentation/Cocoa/Conceptual/XMLParsing
---

# Introduction to Event-Driven XML Programming Guide for Cocoa

Explains how to process XML documents using the Cocoa streaming parser.

## Organization of This Document

This programming topic includes the following articles:

- [Parser Capabilities and Architecture](Articles/ParserArchitecture.html#//apple_ref/doc/uid/20002263-BCIHAHJE) gives an overview of how the Cocoa streaming parser (NSXMLParser) processes an XML document and what kinds of tasks it is best suited for. - [XML Parsing Basics](Articles/UsingParser.html#//apple_ref/doc/uid/20002264-BCIIJEEH) describes the essential steps for using NSXMLParser: creating and initializing the instance, responding to delegation messages, and handling parsing errors. - [Handling XML Elements and Attributes](Articles/HandlingElements.html#//apple_ref/doc/uid/20002265-BCIJFGJI) offers suggestions and examples for handling XML attributes and elements, the most common kinds of XML constructs. - [Handling Parsing Errors](Articles/HandlingParseErrors.html#//apple_ref/doc/uid/20002266-CJBIDHFB) describes how to handle errors that the NSXMLParser object finds in the XML. - [Using Multiple Delegates](Articles/UsingMultipleDelegates.html#//apple_ref/doc/uid/20002267-BAJJDECB) discusses the technique of using multiple delegates of the NSXMLParser instance to simplify and streamline XML processing. - [Constructing XML Tree Structures](Articles/ConstructingTrees.html#//apple_ref/doc/uid/20002268-BCIEABEE) gives some suggestions for creating DOM-style trees using NSXMLParser. - [Validation Tips and Techniques](Articles/ValidatingXML.html#//apple_ref/doc/uid/20002269-BBCFBAHB) offers suggestions for using NSXMLParser when validating an XML document against its DTD or other schema. - [XML Glossary](Articles/XMLGlossary.html#//apple_ref/doc/uid/20002271-CJBDBHFG) lists definitions of XML and DTD terms that are part of the NSXMLParser programmatic interface.

## See Also

There are many websites that are rich sources of information on XML, DTD, XML tools, open-source parsers, and related specifications and technologies. A few of them are listed below, but a search of the Internet (with, for example, “XML tutorial” in the search field) will find many excellent sources of information:

- World Wide Web Consortium — [http://www.w3.org/](http://www.w3.org/) - The Annotated XML Specification — [http://www.xml.com/axml/testaxml.htm](http://www.xml.com/axml/testaxml.htm) - O’Reilly XML.com — [http://www.xml.com/](http://www.xml.com/) - The XML parser and toolkit of Gnome (libxml) — [http://xmlsoft.org/](http://xmlsoft.org/)

[Next](Articles/ParserArchitecture.html)

Copyright © 2004, 2010 Apple Inc. All Rights Reserved. [Terms of Use](http://www.apple.com/legal/internet-services/terms/site.html) | [Privacy Policy](http://www.apple.com/privacy/) | Updated: 2010-03-24
