Download Reference Manual
The Developer's Library for D
About Wiki Forums Source Search Contact

tango.text.xml.Document does not handle comments

Moderators: kris

Posted: 10/30/08 11:54:39

This 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 failure

Moving 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

Author Message

Posted: 11/02/08 05:27:56 -- Modified: 11/02/08 05:38:55 by
kris

That's odd, but thanks for the heads' up. Would you mind creating a ticket for this, please?

[edit] now fixed, but still need a ticket if you don't mind :)