I'm pretty inexperienced with Objective-C & Cocoa, but learning fast! I'm working on an app that needs to parse XML files, and format some text according to a few pseudo-HTML tags, such as <body>content</body> and <heading>content</heading> etc. I've been doing some command-line app experiments with the NSXML API (NSXMLNode, NSXMLDocument, NSXMLElement etc.) and I'm happy about reading, writing, creating, parsing etc. an XML document. What I'm not sure of is, once I've extracted the data from the XML document and got a tree of XML objects, how to format the text in the NSTextView, and also how to detect which ranges of text in the NSTextView are in what size, font weight etc. Could somebody please point me towards the appropriate classes etc, and I'll try and work it out from the Apple docs.