package xer
Type Members
- class XerDecodeException extends RuntimeException
- class XerDecoder extends AnyRef
Schema-driven XER decoder using StAX pull parsing.
Schema-driven XER decoder using StAX pull parsing.
Both Basic XER (BXER) and Canonical XER (CXER) are supported — the only difference visible at the record level is whitespace handling, which StAX normalises for us.
Mapping summary (X.693):
- NULL → empty element, produces null
- BOOLEAN → <true/> or <false/>
- INTEGER → element text content parsed as Long
- ENUMERATED → element text is the symbolic name
- OCTET STRING → hex-encoded text (pairs of hex digits)
- BIT STRING (unnamed) → hex-encoded text of the padded bytes
- BIT STRING (named) → named-bit list struct (_bytes + _namedBits)
- String types → element text content
- OBJECT IDENTIFIER → dot-notation text (e.g. "1.2.840.10045.2.1")
- SEQUENCE / SET → child elements keyed by field name
- SEQUENCE OF / SET OF → repeated child elements of any tag
- CHOICE → single child element whose tag names the active alternative
- Tagged types → inner type decoded (tags invisible in XER)
- class XerEncoder extends AnyRef
Schema-driven XER encoder.
Schema-driven XER encoder. Produces Basic XER (BXER) output.
Each record is wrapped in
<rootTag>…</rootTag>followed by a newline, so concatenated records form a valid XerRecordIterator input stream.