By default, a self-closing tag is ToString()
ed by XElement
as follows:
<element />
<element attrib="value" />
However, I would like it without the extra space, i.e.
<element/>
<element attrib="value"/>
Is this possible with the XElement
API?
I guess I’ll just do a string replace that will replace " />"
with "/>"
.