views:

152

answers:

0

I am using an XMLTextWriter to create an XML document dynamically (in VB.Net). I want empty tags to appear like this - <Tag></Tag> and not this - <Tag />

So, I am using WriteFullEndElement to end the element tag. But it is writing out the tag as -

<Tag>

</Tag>

i.e. with a newline character between the tags. The web service reading this XML rejects it due to the newline character.

How do I avoid the newline, and have both the start and end tags on the same line?