Documentation
¶
Overview ¶
Package xml wraps encoding/xml as a codec.Codec implementation registered under Format("xml"). Blank-importing this package is enough to make XML resolvable via the core/codec registry.
Package xml — range 0.3.3.* (ADR 0005 service/codec/xml block).
Package xml — adapts *encoding/xml.Decoder to codec.Decoder.
Package xml — adapts *encoding/xml.Encoder to codec.Encoder.
Package xml — declares the sentinel *errs.Error values for XML.
Index ¶
Constants ¶
View Source
const CodeXMLMarshalFailed errs.Code = 0x00_03_03_01 // 0.3.3.1
CodeXMLMarshalFailed identifies a failure inside encoding/xml.Marshal.
View Source
const CodeXMLUnmarshalFailed errs.Code = 0x00_03_03_02 // 0.3.3.2
CodeXMLUnmarshalFailed identifies a failure inside encoding/xml.Unmarshal.
Variables ¶
View Source
var ( // MarshalFailed wraps a failure from encoding/xml.Marshal. MarshalFailed = errs.Define(CodeXMLMarshalFailed, "MARSHAL_FAILED", "XML encoding failed", "service/codec/xml: encoding/xml.Marshal returned an error") // UnmarshalFailed wraps a failure from encoding/xml.Unmarshal. UnmarshalFailed = errs.Define(CodeXMLUnmarshalFailed, "UNMARSHAL_FAILED", "XML decoding failed", "service/codec/xml: encoding/xml.Unmarshal returned an error") )
View Source
var ( //: register the singleton and expose it as a typed package var. Codec codec.Codec = codec.Register(&xmlCodec{}) )
Package-level state: the codec singleton plus the hoisted MIME / extension tables.
Functions ¶
Types ¶
This section is empty.
Click to show internal directories.
Click to hide internal directories.