[prev in list] [next in list] [prev in thread] [next in thread] 

List:       jibx-users
Subject:    RE: [jibx-users] Controlling whether empty elements are self-closing
From:       "Dan Cooperstock" <Dan.Cooperstock () quest ! com>
Date:       2006-03-09 16:46:15
Message-ID: 46C5DCD410224A42BE3151AC8AE75E4E07448B38 () tormbxw01 ! prod ! quest ! corp
[Download RAW message or body]

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
dan.cooperstock@quest.com    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: jibx-users-admin@lists.sourceforge.net
[mailto:jibx-users-admin@lists.sourceforge.net] On Behalf Of Dennis
Sosnoski
Sent: Wednesday, March 08, 2006 5:59 PM
To: jibx-users@lists.sourceforge.net
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_______________________________________________
jibx-users mailing list
jibx-users@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/jibx-users

[prev in list] [next in list] [prev in thread] [next in thread] 

Configure | About | News | Add a list | Sponsored by KoreLogic