It would be great if this could be added to the core JiBX code. The reason this is a problem for us is that the most major XML file in our project gets written two ways: usually by JiBX, but occasionally by JDOM. (JDOM is used for periodic conversions, by a simple stand-alone converter class.) When I write it out with JDOM, it always self-closes elements, and then when I diff them against the previous version (written by JiBX that doesn't do so) there are way too many doffs!
Thanks. ------------------------------------------------------------------- Dan Cooperstock, Senior Software Developer, Quest Software 260 King St. E., Toronto ON Canada M5A 4L5 [EMAIL PROTECTED] 416-933-5165 With Quest Software, you can expect more ... more performance, more productivity, more value from your IT investments. Visit www.quest.com to learn how. -----Original Message----- From: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED] On Behalf Of Dennis Sosnoski Sent: Wednesday, March 08, 2006 5:59 PM To: [email protected] Subject: Re: [jibx-users] Controlling whether empty elements are self-closing Yes, I've thought about doing this before and it is fairly easy to implement with only minor added cost (checking a flag to see if the start tag has been closed yet). I really try to avoid even such minor added costs, but I think I'll go ahead and implement the change in 1.1. Dan, the JiBX code as currently structured writes an empty tag if the binding defines only attribute values as present on the element. If you have child elements it will always use a start tag/close tag pair instead. That's why a change is needed to the writer in order to defer closing the start tag until some content is written, so that an empty tag can be used instead. - Dennis ------------------------------------------------------- This SF.Net email is sponsored by xPML, a groundbreaking scripting language that extends applications into web and mobile media. Attend the live webcast and join the prime developer group breaking into this new coding territory! http://sel.as-us.falkag.net/sel?cmd=lnk&kid0944&bid$1720&dat1642 _______________________________________________ jibx-users mailing list [email protected] https://lists.sourceforge.net/lists/listinfo/jibx-users
