Glen Daniels wrote:

Hey Alek:

in short yes! XMLStreamWriter.writeEmptyElement() should be called from OM (see example below).


Ah, but writeEmptyElement() doesn't let you write attributes, does it? It can write <test/> but not <test foo="bar"/>, as I understand it.

yes


however i wonder why you care - from XML 1,0 and Infoset point of view thos2e two are equivalent!


Optimization, less bytes on the wire, accurately reflecting the bytestream that came in one end (yes, I know that the infoset is the same, but I still think it's more polite to be able to accurately reproduce what you got) and went out the other.

BTW: to bad that solutoion from XmlPull API did nto survive in StAX i.e. it was intelligent to do <empty/> by default unless you called character("") in between.


+1, that's what Axis 1 does as well.

hmm, i will take a look and see if i can change this for StAX RI - after all infoset is equivalent ...

alek

--
The best way to predict the future is to invent it - Alan Kay

Reply via email to