D issues are now tracked on GitHub. This Bugzilla instance remains as a read-only archive.
Issue 4394 - std.xml prints empty elements as non-empty
Summary: std.xml prints empty elements as non-empty
Status: RESOLVED WORKSFORME
Alias: None
Product: D
Classification: Unclassified
Component: phobos (show other issues)
Version: D2
Hardware: Other Mac OS X
: P2 normal
Assignee: No Owner
URL:
Keywords: patch
Depends on:
Blocks:
 
Reported: 2010-06-26 06:32 UTC by Jacob Carlborg
Modified: 2014-03-18 23:11 UTC (History)
1 user (show)

See Also:


Attachments
Fixes the problem (750 bytes, patch)
2010-06-26 06:32 UTC, Jacob Carlborg
Details | Diff

Note You need to log in before you can comment on or make changes to this issue.
Description Jacob Carlborg 2010-06-26 06:32:26 UTC
Created attachment 677 [details]
Fixes the problem

Element element = new Element("br");
writeln(element);

The above code produces "<br></br>" and not the expected "<br />". The attached
patch fixes the problem.
Comment 1 Infiltrator 2014-03-18 23:11:00 UTC
This looks correct as of v2.065.

--------------------------------------------
import std.stdio;
import std.xml;
void main() {
	Element element = new Element("br");
	writeln(element);
}
--------------------------------------------
Application output:

<br />