[#BloombergLP-balxml-Encoder_Context] = xref:BloombergLP.adoc[BloombergLP]::xref:BloombergLP/balxml.adoc[balxml]::Encoder_Context :relfileprefix: ../../ :mrdocs: This `struct` contains state that is maintained during encoding. It also contains methods for switching between pretty formatting and compact formatting, based on the encoding options. == Synopsis Declared in `<balxml_encoder.h>` [source,cpp,subs="verbatim,replacements,macros,-callouts"] ---- class Encoder_Context; ---- == Member Functions [cols="1,4"] |=== | Name| Description | xref:BloombergLP/balxml/Encoder_Context/2constructor.adoc[`Encoder_Context`] [.small]#[constructor]# | Create a context bound to the specified `formatter` and `encoder`. | xref:BloombergLP/balxml/Encoder_Context/addAttribute-01.adoc[`addAttribute`] | `addAttribute` overloads | xref:BloombergLP/balxml/Encoder_Context/closeElement.adoc[`closeElement`] | Close the element with the specified `name`. | xref:BloombergLP/balxml/Encoder_Context/encoderOptions.adoc[`encoderOptions`] | Return a reference to the encoder options in use. | xref:BloombergLP/balxml/Encoder_Context/invalidate.adoc[`invalidate`] | Invalidate the current encoding state. | xref:BloombergLP/balxml/Encoder_Context/logError.adoc[`logError`] | Log an encoding error or warning with the specified `text`, `tag`, `formattingMode`, and optional `index`. Return the severity of the logged message. | xref:BloombergLP/balxml/Encoder_Context/openElement.adoc[`openElement`] | Open an element with the specified `name`. | xref:BloombergLP/balxml/Encoder_Context/rawOutputStream.adoc[`rawOutputStream`] | Return the raw output stream used by this context. | xref:BloombergLP/balxml/Encoder_Context/status.adoc[`status`] | Return the current encoding status. |=== [.small]#Created with https://www.mrdocs.com[MrDocs]#