title: Testing an NSXMLParserDelegate class
body: <p>I have implemented the NSXMLParserDelegate protocol and appear to be successfully parsing XML with NSXMLParser. The XSD for the XML I am parsing is fairly involved with 100 or so tags and attributes, that can get rather deeply nested at times. I am populating an object hierarchy from the data in the XML documents and all seems to be going well so far.</p>
  
  <p>My question is, how do I effectively test this? There is a lot of "if/else if" logic in my delegate as well as as BOOL flags to keep track of where I am in within the document being parsed. I could have easily introduced a typographical error while writing the delegate.</p>
  
  <p>My initial inclination is to create a test input document that uses all of the elements and attributes specified in the XSD. Once it has been parsed, I could "NSLog()" everything that has been inserted into the object hierarchy, but that seems too labor intensive.</p>
  
  <p>Is there a better way to think about this problem, or shall I just roll up my sleeves and brute force it? </p>