Lines Matching defs:Decoder
40 // In tokens returned by Decoder.Token, the Space identifier
139 // Decoder.
155 // A Decoder represents an XML parser reading a particular input stream.
157 type Decoder struct {
229 func NewDecoder(r io.Reader) *Decoder {
230 d := &Decoder{
241 func NewTokenDecoder(t TokenReader) *Decoder {
242 // Is it already a Decoder?
243 if d, ok := t.(*Decoder); ok {
246 d := &Decoder{
279 func (d *Decoder) Token() (Token, error) {
347 func (d *Decoder) translate(n *Name, isElementName bool) {
365 func (d *Decoder) switchToReader(r io.Reader) {
394 func (d *Decoder) push(kind int) *stack {
407 func (d *Decoder) pop() *stack {
420 func (d *Decoder) pushEOF() {
446 func (d *Decoder) popEOF() bool {
455 func (d *Decoder) pushElement(name Name) {
462 func (d *Decoder) pushNs(local string, url string, ok bool) {
470 func (d *Decoder) syntaxError(msg string) error {
480 func (d *Decoder) popElement(t *EndElement) bool {
518 func (d *Decoder) autoClose(t Token) (Token, bool) {
541 func (d *Decoder) RawToken() (Token, error) {
548 func (d *Decoder) rawToken() (Token, error) {
636 d.err = fmt.Errorf("xml: encoding %q declared but Decoder.CharsetReader is nil", enc)
854 func (d *Decoder) attrval() []byte {
889 func (d *Decoder) space() {
908 func (d *Decoder) getc() (b byte, ok bool) {
931 // InputOffset returns the input stream byte offset of the current decoder position.
934 func (d *Decoder) InputOffset() int64 {
940 func (d *Decoder) savedOffset() int {
952 func (d *Decoder) mustgetc() (b byte, ok bool) {
962 func (d *Decoder) ungetc(b byte) {
982 func (d *Decoder) text(quote int, cdata bool) []byte {
1160 func (d *Decoder) nsname() (name Name, ok bool) {
1178 func (d *Decoder) name() (s string, ok bool) {
1196 func (d *Decoder) readName() (ok bool) {