xmpp: mellium.im/xmpp/internal/marshal Index | Files

package marshal

import "mellium.im/xmpp/internal/marshal"

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

Index

Package Files

encode.go

func EncodeXML Uses

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 Uses

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.

Bugs

Functions in this package are extremely inefficient.

Package marshal imports 3 packages (graph) and is imported by 1 packages. Updated 2019-07-24. Refresh now. Tools for package owners.