Uploaded image for project: 'yangtools'
  1. yangtools
  2. YANGTOOLS-927

Do not emit empty values in XMLStreamNormalizedNodeStreamWriter

    XMLWordPrintable

Details

    • Improvement
    • Status: Resolved
    • Medium
    • Resolution: Done
    • None
    • 2.1.8
    • codecs
    • None

    Description

      When XMLStreamNormalizedNodeStreamWriter is emitting an empty element, we should be using writeEmptyElement() if possible. This requires us to postpone the call to writeStartElement() until we have see the next event. If that event is writeEndElement() and we do not have to emit namespace declaration, we can just use writeEmptyElement().

      Same is true for writeElement(), which has an empty or null value.

      Attachments

        No reviews matched the request. Check your Options in the drop-down menu of this sections header.

        Activity

          People

            rovarga Robert Varga
            rovarga Robert Varga
            Votes:
            0 Vote for this issue
            Watchers:
            1 Start watching this issue

            Dates

              Created:
              Updated:
              Resolved: