www.digitalmars.com         C & C++   DMDScript  

digitalmars.D.learn - Tango xml , failure of append node to parsed document

Code:
        char[] content = "<a><b>B</b></a>";

        auto doc = new Document!(char);
        doc.parse(content);

        auto printer = new DocPrinter!(char);
        Stdout(printer(doc)).newline;///

        doc.root.firstChild.element(null, "c", "C");
        Stdout( printer(doc) ).newline;/// "<a><b>B</b></a>", c node not
created, 

failure of append node c to doc, how to fix this?


-- 
yidabu <yidabu.spam gmail.com>
http://www.dsource.org/projects/dwin

D -(D Chinese):
http://www.d-programming-language-china.org/
http://bbs.d-programming-language-china.org/
http://dwin.d-programming-language-china.org/
http://scite4d.d-programming-language-china.org/
Jul 29 2008