title: pyparsing - parse xml comment
body: <p>I need to parse a file containing xml comments.  Specifically it's a c# file using the MS <code>///</code> convention.</p>
  
  <p>From this I'd need to pull out <code>foobar</code>, or <code>/// foobar</code> would be acceptable, too.  (Note - this still doesn't work if you make the xml all on one line...)</p>
  
  <pre><code>testStr = """
      ///&lt;summary&gt;
      /// foobar
      ///&lt;/summary&gt;
      """
  </code></pre>
  
  <p>Here is what I have:</p>
  
  <pre><code>import pyparsing as pp
  
  _eol = pp.Literal("\n").suppress()
  _cPoundOpenXmlComment = Suppress('///&lt;summary&gt;') + pp.SkipTo(_eol)
  _cPoundCloseXmlComment = Suppress('///&lt;/summary&gt;') + pp.SkipTo(_eol)
  _xmlCommentTxt = ~_cPoundCloseXmlComment + pp.SkipTo(_eol)
  xmlComment = _cPoundOpenXmlComment + pp.OneOrMore(_xmlCommentTxt) + _cPoundCloseXmlComment
  
  match = xmlComment.scanString(testStr)
  </code></pre>
  
  <p>and to output:</p>
  
  <pre><code>for item,start,stop in match:
      for entry in item:
          print(entry)
  </code></pre>
  
  <p>But I haven't had much success with the grammer working across multi-line.</p>
  
  <p>(note - I tested the above sample in python 3.2; it works but (per my issue) does not print any values)</p>
  
  <p>Thanks!</p>