Re: asymmetry between serialzier and parser inwriting XMLDecl
Stefan Haustein <[email protected]>
| Newsgroups | gmane.text.xml.xmlpull.devel |
|---|---|
| Organization | Univ. Dortmund FB 4 LS 8 |
| Message-ID | <[email protected]> |
> i agree with you. however we want to keep backward compatibility for time > being and then have 2.x version that will fix all problems that were identified. > > so i would think about it as a gradual improvement - the other possibility > introducing new event will break compatibility and that is what we really > want to avoid. anyway this affects only nextToken() method and only > for PROCESSING_INSTRUCTION event and i think in typical > 80/20 cases next() should be used. .... on the other hand, something like the isWhitespace hack would create legacy for new versions, and the XML spec clearly states that the XMLDecl must not be reported as Processing instruction.... What about reporting the contents of the XMLDecl with START_DOCUMENT, before the first "real" event? It must be read anyway to determine the encoding before starting "real" parsing??? Best, Stefan -- Stefan Haustein Univ. Dortmund, FB 4, LS 8 tel: +49 231 755 2499 Baroper Str. 301 fax: +49 231 755 5105 D-44221 Dortmund (Germany) www-ai.cs.uni-dortmund.de