This program:
import std.xml;
import std.stdio;
void main()
{
string s = `<tag attr=""value>"></tag>`;
auto doc = new Document(s);
writeln("attr = ", doc.tag.attr["attr"]);
writeln(doc);
}
compiles and runs with output
attr = "value>
<tag attr=""value>" />
The expected output is
attr = "value>
<tag attr=""value>" />
The xml writer does not encode " and < of the stribute string (actually, it decaodes them again).