internal

package
v0.3.1 Latest Latest
Warning

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

Go to latest
Published: May 27, 2021 License: MIT Imports: 4 Imported by: 0

Documentation

Index

Constants

View Source
const (
	// UTF8XMLHeader is the UTF-8 encoding header.
	UTF8XMLHeader = `<?xml version="1.0" encoding="UTF-8" standalone="yes"?>` + "\n"
	// UTF16XMLHeader is the UTF-16 encoding header.
	UTF16XMLHeader = `<?xml version="1.0" encoding="UTF-16" standalone="yes"?>` + "\n"
	// XMLSpacePreserve is tells the user agent to convert all newline and tab characters into spaces.
	// Then, it draws all space characters (including leading, trailing and multiple consecutive space characters).
	// Example: xml:space="preserve"
	XMLSpacePreserve = "preserve"
)

Variables

View Source
var (
	// UTF8Encoding is the UTF-8 encoding.
	UTF8Encoding encoding.Encoding = unicode.UTF8
	// UTF16BEEncoding is the UTF-16 Big Endian encoding.
	UTF16BEEncoding encoding.Encoding = unicode.UTF16(unicode.BigEndian, unicode.UseBOM)
	// UTF16LEEncoding is the UTF-16 Little Endian encoding.
	UTF16LEEncoding encoding.Encoding = unicode.UTF16(unicode.LittleEndian, unicode.UseBOM)
)

Functions

func EncodeToUTF16BEXML

func EncodeToUTF16BEXML(w io.Writer, v interface{}) (int64, error)

EncodeToUTF16BEXML ...

func EncodeToUTF16LEXML

func EncodeToUTF16LEXML(w io.Writer, v interface{}) (int64, error)

EncodeToUTF16LEXML ...

func EncodeToUTF8XML

func EncodeToUTF8XML(w io.Writer, v interface{}) (int64, error)

EncodeToUTF8XML ...

func NewUTF16BEDecoder

func NewUTF16BEDecoder() *encoding.Decoder

NewUTF16BEDecoder ...

func NewUTF16BEEncoder

func NewUTF16BEEncoder() *encoding.Encoder

NewUTF16BEEncoder ...

func NewUTF16LEDecoder

func NewUTF16LEDecoder() *encoding.Decoder

NewUTF16LEDecoder ...

func NewUTF16LEEncoder

func NewUTF16LEEncoder() *encoding.Encoder

NewUTF16LEEncoder ...

func NewUTF8Decoder

func NewUTF8Decoder() *encoding.Decoder

NewUTF8Decoder ...

func NewUTF8Encoder

func NewUTF8Encoder() *encoding.Encoder

NewUTF8Encoder ...

func XMLHeaderByEncoding

func XMLHeaderByEncoding(e encoding.Encoding) string

XMLHeaderByEncoding ...

Types

type EncodeToXMLFunc

type EncodeToXMLFunc func(w io.Writer, v interface{}) (int64, error)

EncodeToXMLFunc ...

Jump to

Keyboard shortcuts

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