marshal

package
v0.21.1 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Feb 11, 2022 License: BSD-2-Clause Imports: 3 Imported by: 0

Documentation

Overview

Package marshal contains functions for encoding structs as an XML token stream.

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func EncodeXML

func EncodeXML(w xmlstream.TokenWriter, v interface{}) error

EncodeXML writes the XML encoding of v to the stream.

See the documentation for xml.Marshal for details about the conversion of Go values to XML.

If the stream is an xmlstream.Flusher, EncodeXML calls Flush before returning.

func EncodeXMLElement

func EncodeXMLElement(w xmlstream.TokenWriter, v interface{}, start xml.StartElement) error

EncodeXMLElement writes the XML encoding of v to the stream, using start as the outermost tag in the encoding.

See the documentation for xml.Marshal for details about the conversion of Go values to XML.

If the stream is an xmlstream.Flusher, EncodeXMLElement calls Flush before returning.

func TokenReader added in v0.17.0

func TokenReader(v interface{}) (xml.TokenReader, error)

TokenReader returns a reader for the XML encoding of v.

Types

This section is empty.

Notes

Bugs

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL