From: "Depender Kumar" <[EMAIL PROTECTED]> > Hi , > > We r using dom4j for creating XML.. > One of the requirement is purposly put a emplty string into a tag like > > <user></user> > But when i try to do this it automatically converts to </user> > > ..How can i get <user></user>
OutputFormat format = new OutputFormat(); format.setExpandEmptyElements(true); XMLWriter writer = new XMLWriter(stream, format); writer.write( doc ); James ------- http://radio.weblogs.com/0112098/ __________________________________________________ Do You Yahoo!? Everything you'll ever need on one web page from News and Sport to Email and Music Charts http://uk.my.yahoo.com ------------------------------------------------------- This SF.NET email is sponsored by: SourceForge Enterprise Edition + IBM + LinuxWorld = Something 2 See! http://www.vasoftware.com _______________________________________________ dom4j-user mailing list [EMAIL PROTECTED] https://lists.sourceforge.net/lists/listinfo/dom4j-user