marshal

package
Version: v0.19.0 Latest Latest
Warning

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

Go to latest
Published: May 2, 2021 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

Source Files

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
t or T : Toggle theme light dark auto
y or Y : Canonical URL