Forum Navigation
tango.text.xml.Document does not handle comments
Moderators:
kris
Posted: 10/30/08 11:54:39This file
<?xml version="1.0" encoding="UTF-8"?> <widget class="Display"> </widget> <!-- boom -->fed into
import tango.text.xml.Document; import tango.text.xml.DocPrinter; import tango.io.Stdout; private import tango.io.File; alias Document!(char) Doc; void main(){ auto doc = new Doc; auto f = new File("project.xml"); doc.parse( cast(char[]) f.read ); auto print = new DocPrinter!(char); Stdout(print(doc)).newline;leads to
tango.core.Exception.AssertException@..\tango\text\xml\PullParser.d(601): Assertion failureMoving the comment line before the final node does not trigger the exception, but the comment is also printed, I wonder if this is a bug or feature?
Tom
Ciao
Tom