saxparser

package module
v0.1.0 Latest Latest
Warning

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

Go to latest
Published: Nov 21, 2021 License: MIT Imports: 3 Imported by: 0

README

SaxParser

A SAX parser in Go.

It parses an XML without loading the entire contents into memory. Instead it uses callback functions to notify the user of the different elements as it goes along the file.

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type SaxHandler

type SaxHandler interface {
	Characters(chars []byte)
	Comment(chars []byte)
	Directive(chars []byte)
	EndElement(name string)
	ProcessingInstruction(target string, instruction []byte)
	StartElement(name string, attributes map[string]string)
}

type SaxParser

type SaxParser struct {
	// contains filtered or unexported fields
}

func NewParser

func NewParser(reader io.Reader, handler SaxHandler) *SaxParser

func (*SaxParser) Parse

func (p *SaxParser) Parse() error

Jump to

Keyboard shortcuts

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