Question about XML tag output formatting
I was wondering if there was a way in any of the Java API's where I could get the XML output format to be different. Here's an example
instead of <tag attr="" /> when there is no data it needs to wrap around I would like it to look like <tag attr=""></tag>. Anyone know of a method.
Thanks in advance.
Indeed I do have a need. I need to input information into an xml file from an excel file....easy enough. But the problem is the xml parser that the file eventually uses is a legacy application, so I have to have the </tag> because my guess is they wrote the parser using text functions as opposed to using something like xerces. The way I have found to do this is using XMLSpy, there is a setting that will closed empty tags differently and then enable the pretty print.
Thanks