Documentation ¶
Overview ¶
Package xml minifies XML1.0 following the specifications at http://www.w3.org/TR/xml/.
Index ¶
Examples ¶
Constants ¶
This section is empty.
Variables ¶
View Source
var DefaultMinifier = &Minifier{}
DefaultMinifier is the default minifier.
View Source
var EntitiesMap = map[string][]byte{ "apos": []byte("'"), "gt": []byte(">"), "quot": []byte("\""), }
Entities are all named character entities.
Functions ¶
Types ¶
type TokenBuffer ¶
type TokenBuffer struct {
// contains filtered or unexported fields
}
TokenBuffer is a buffer that allows for token look-ahead.
func NewTokenBuffer ¶
func NewTokenBuffer(l *xml.Lexer) *TokenBuffer
NewTokenBuffer returns a new TokenBuffer.
func (*TokenBuffer) Peek ¶
func (z *TokenBuffer) Peek(pos int) *Token
Peek returns the ith element and possibly does an allocation. Peeking past an error will panic.
func (*TokenBuffer) Shift ¶
func (z *TokenBuffer) Shift() *Token
Shift returns the first element and advances position.
Click to show internal directories.
Click to hide internal directories.