http://d.puremagic.com/issues/show_bug.cgi?id=4069
Summary: std.xml.Document.pretty saves empty elements with spaces and line breaks Product: D Version: unspecified Platform: Other OS/Version: Windows Status: NEW Severity: normal Priority: P2 Component: Phobos AssignedTo: nob...@puremagic.com ReportedBy: r.sagita...@gmx.de --- Comment #0 from Rainer Schuetze <r.sagita...@gmx.de> 2010-04-05 10:11:32 PDT --- Test case: import std.stdio; import std.xml; import std.string; void main() { auto doc = new Document(new Tag("root")); doc ~= new Element("elem", ""); string s = join(doc.pretty(1),""); writefln("doc: '%s'", s); auto xml = new Document(s); string t = xml.elements[0].text(); writefln("elem: '%s'", t); assert(t == ""); } outputs: doc: '<root> <elem> </elem></root>' elem: ' ' core.exception.asserter...@test(17): Assertion failure This does not happen with non-empty elements or with Document.toString -- Configure issuemail: http://d.puremagic.com/issues/userprefs.cgi?tab=email ------- You are receiving this mail because: -------