simplexml

package
v0.0.0-...-c8ae55d Latest Latest
Warning

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

Go to latest
Published: Sep 15, 2023 License: BSD-3-Clause Imports: 4 Imported by: 0

Documentation

Overview

Package simplexml is used to parse the SVG xml file, but it avoids `encoding/xml`for JS, and it's compatible with TinyGo.

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Attr

type Attr struct {
	Name  Name
	Value string
}

An Attr represents an attribute in an XML element (Name=Value).

type Decoder

type Decoder interface {
	Token() (Token, error)
}

func NewDecoder

func NewDecoder(r io.Reader) Decoder

type EndElement

type EndElement struct {
	Name Name
}

An EndElement represents an XML end element.

type Name

type Name struct {
	Space, Local string
}

A Name represents an XML name (Local) annotated with a name space identifier (Space). In tokens returned by Decoder.Token, the Space identifier is given as a canonical URL, not the short prefix used in the document being parsed.

type StartElement

type StartElement struct {
	Name Name
	Attr []Attr
}

A StartElement represents an XML start element.

type Token

type Token interface{}

A Token is an interface holding one of the token types: StartElement, EndElement.

Jump to

Keyboard shortcuts

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