www.digitalmars.com         C & C++   DMDScript  

digitalmars.D - std.xml empty element

reply Tom <tom nospam.com> writes:
Hi, how can I create an empty element with current D2 std.xml Element 
implementation?

stdout.writeln(new Element("foo")); // Yields <foo></foo> instead of <foo />

Thanks in advance,
Tom;
Feb 24 2011
parent "Lars T. Kyllingstad" <public kyllingen.NOSPAMnet> writes:
On Thu, 24 Feb 2011 09:09:35 -0300, Tom wrote:

 Hi, how can I create an empty element with current D2 std.xml Element
 implementation?
 
 stdout.writeln(new Element("foo")); // Yields <foo></foo> instead of
 <foo />
 
 Thanks in advance,
 Tom;

Hi, I see you asked this question in D.learn first, and that is indeed the right place for it. The fact that you haven't gotten an answer there yet doesn't mean you won't get one, it just means that nobody's had the time, opportunity or knowledge to answer yet. You just have to be patient. :) (As for the question, I'm sorry, I don't know. I've never used std.xml.) -Lars
Feb 24 2011