[JDEV] just wondering...
zak
zsy at photoalley.com
Fri Jan 4 18:41:39 CST 2002
hi all,
i was just wondering why the opening xml stream was designed to work the way
it does. my question really is why can't/should't/doesn't the opening xml
stream contain a closing element? what is the rationale behind keeping a
running xml document going for the duration of the session. furthurmore, it
makes it akward to use some of the handy XML libraries out there like JDOM,
dom4j, etc. because many of the classes require well formed xml. i know that
the sax parser makes it possible to deal with non well formed xml, but i'd
prefer to just drop the data returned by the server in to some sort of
document class instead of using a sax handler to pick out the individual xml
elements i'm interested in. plus using the sax parser to directly read from
a socket inputstream has it's own associated issues i'd like to avoid.
for example, instead of sending this...
<?xml version='1.0' encoding='UTF-8' ?> <stream:stream to='jabber.org'
xmlns='jabber:client' xmlns:stream='http://etherx.jabber.org/streams'>
doesn't it make sense to send...
<?xml version='1.0' encoding='UTF-8' ?> <stream:stream to='jabber.com'
xmlns='jabber:client' xmlns:stream='http://etherx.jabber.org/streams'>
</stream:stream>
i'm interested to hear how other people are dealing with this, and how any of
you are using libraries such as JDOM. i'm not slamming the implementation.
just curious.
regards, zak.
More information about the JDev
mailing list