When using StAX Writer APIs a code is executing in a sequence like the following:
writeStartElement(...)
writeAttribute(...)
writeComment(...)
writeCharacters(...)
The problem is that in the resulting XML, the generated comment is *inside* the element header
<a b=c <!--comment-->>characters
writeStartElement(...)
writeAttribute(...)
writeComment(...)
writeCharacters(...)
The problem is that in the resulting XML, the generated comment is *inside* the element header
<a b=c <!--comment-->>characters