problem using std.xml

Gide Nwawudu gide at
Fri May 2 05:38:36 PDT 2008

On Fri, 02 May 2008 09:34:00 +0200, boyd <gaboonviper at> wrote:

>I've been trying to work with the D2 xml module. It compiles fine, but  
>when I run it I get an access violation. Am I doing something wrong?
>module main;
>import std.stdio;
>import std.file;
>import std.xml;
>int main(){
>     string s = cast(string)"widget.xml");
>     check(s);
>     auto doc = new Document(s);
>     writefln(doc);
>     return 0;

If widget.xml is malformed, it crashes. Probably a bug.

Tested with the following; the first errors, the second version  is

<?xml version="1.0"?><widget>

<?xml version="1.0"?><widget></widget>


More information about the Digitalmars-d-learn mailing list