Er, at the risk of being told that I don't understand XML...
Surely the thing you want to do would break the XML. If you want to use the <MyElement /> syntax (avoiding </MyElement> ; ) , you can only do so if the element has no child elements. It can have attributes, but cannot contain elements.
So, no XML package is likely to be able to do what you say, because it's not an XML operation. If you really need to do what you say, it would have to be done by ordinary
Java text manipulation.
[ November 25, 2002: Message edited by: Peter Chase ]