NSXMLDocument is the normal tree-based XML parser in Cocoa. But if you're writing for the iPhone, this class isn't available. Even on the Mac, sometimes you want tree-based parsing without the full overhead of
NSXMLDocument. Here's how to use libxml2 to perform tree-based parsing in a Cocoa-friendly way.