On 29 Aug 2007, at 06:56, Yen-Ju Chen wrote: > It breaks on this one even [TRXMLParser -setMode:] is set to > PARSER_MODE_SGML. > > <html> > <body> > <br> > </body></html> > > It parses fine, but the resulted attributed string is nil.
Yup. The parser detects the end of the document by keeping a count of the open tags, and waiting for it to hit zero. This doesn't work in SGML, so I've changed it to just watch for <html> tags being opened and closed. As long as every <html> has a matching </html> in the document, it will now work. This: <html> text<br>on<br>four<br>lines </html> Now gives this: text on four lines I've also fixed the leading whitespace issue. David _______________________________________________ Etoile-dev mailing list [email protected] https://mail.gna.org/listinfo/etoile-dev
