title: Error Building Project With NSXMLParserDelegate
body: <p><strong>TurbineXMLParser.h</strong></p>
  
  <pre><code>#import &lt;Foundation/Foundation.h&gt;
  
  @interface TurbineXMLParser : NSObject &lt;NSXMLParserDelegate&gt; {
  ...
  </code></pre>
  
  <p><strong>TurbineXMLParser.m</strong></p>
  
  <pre><code>#import "TurbineXMLParser.h"
  </code></pre>
  
  <p>I have just added a new class to my current project that I previously tested in a single file. When I try and build the project I get the error: <em>error: cannot find protocol declaration for 'NSXMLParserDelegate'</em> </p>
  
  <p>I did a bit of searching and tried adding the following ...</p>
  
  <p><strong>TurbineXMLParser.h</strong></p>
  
  <pre><code>#import &lt;Foundation/Foundation.h&gt;
  
  @protocol NSXMLParserDelegate;
  
  @interface TurbineXMLParser : NSObject &lt;NSXMLParserDelegate&gt; {
  ...
  </code></pre>
  
  <p>but still get the warning: <em>warning: no definition of protocol 'NSXMLParserDelegate' is found</em></p>
  
  <p>any help would be much appreciated</p>
  
  <pre><code>.
  .
  .
  </code></pre>
  
  <h1>EDIT_002:</h1>
  
  <p>Removing <code>&lt;NSXMLParserDelegate&gt;</code> from the @interface did work, but I am curious as to why, am I getting mixed up &amp; muddled? I was under the impression that the delegate object must adopt the NSXMLParserDelegate protocol i.e. adding <code>&lt;NSXMLParserDelegate&gt;</code> after the superclass.</p>
  
  <p>I have two instances where this is working differently, the first is a project in a single command line file where If I don't add <code>&lt;NSXMLParserDelegate&gt;</code> is warns that:</p>
  
  <pre><code>class 'TestXMLParser' does not implement the 'NSXMLParserDelegate' protocol
  </code></pre>
  
  <p>The second instance is where I have setup multiple *.h and *.m files (one of the classes being MyXMLParser.h, MyXMLParser.m) when I try to build the project with <code>&lt;NSXMLParserDelegate&gt;</code> I get this error:</p>
  
  <pre><code>error: cannot find protocol declaration for 'NSXMLParserDelegate'
  </code></pre>
  
  <p>Remove <code>&lt;NSXMLParserDelegate&gt;</code> and it all works fine, no errors, no warning...</p>
  
  <p>gary</p>