XmlTextWriter end tag question
Posted on 2006-05-18
I am working on an app that uses the XmlTextWriter class to create an XML doc. The problem is that my xml doc will have several nodes like this:
This is all fine, when the properties of the folder (name, ID) are empty, I want the xml tag to look like it does above '<foldername />'. But if there are no folders in the folder collection, I want it to be written like this:
<folders></folders>, and I can only seem to get it to write it like this <folders />.
Does anyone know how to force this seperate ending tag?