Package io.kubfly.sdk.codec.xml
package io.kubfly.sdk.codec.xml
-
ClassDescriptionAn XML document written with the
XmlGeneratorinto a buffer of its own that grows: the end tags by the elements open, an element without content as<name/>, the structure checked as it goes (an attribute after the content, an attribute repeated, a text outside the element of the document, a second element of the document, an end with nothing open —IllegalStateException).WhatXmlParser.next()read.The XML generator: tags, attributes and text written straight into abyte[]at an offset, the offset after them returned — nothing left for the collector of garbage, asJsonGenerator; anullbuffer writes nothing and counts the bytes.A streaming parser of XML, strict and without a tree:XmlParser.next()reads the document event by event (XmlEvent), a reader takes what it needs andskipsthe rest.