xml

package
v1.0.0 Latest Latest
Warning

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

Go to latest
Published: Dec 6, 2023 License: Apache-2.0 Imports: 12 Imported by: 0

Documentation

Index

Constants

View Source
const (
	Matrix = reflect.UnsafePointer + iota
	MatrixWithMapIndex
	RGBA
	Empty
)
View Source
const DefaultSpacing = 4
View Source
const InvalidIdx = -1

Variables

View Source
var (
	AllPatterns = []associatedRegex{
		{/* contains filtered or unexported fields */},
		{/* contains filtered or unexported fields */},
		{/* contains filtered or unexported fields */},
		{/* contains filtered or unexported fields */},
	}
)

Functions

This section is empty.

Types

type Context

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

Context give a context to an event

type Data

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

func CreateDataType

func CreateDataType(data string) *Data

func (*Data) GetBool

func (d *Data) GetBool() bool

func (*Data) GetData

func (d *Data) GetData() any

func (*Data) GetFloat64

func (d *Data) GetFloat64() float64

func (*Data) GetInt64

func (d *Data) GetInt64() int64

func (*Data) GetString

func (d *Data) GetString() string

func (*Data) GetUint64

func (d *Data) GetUint64() uint64

func (*Data) Kind

func (d *Data) Kind() reflect.Kind

func (*Data) String

func (d *Data) String() string

type Element

type Element struct {
	StartElement _xml.StartElement
	EndElement   _xml.EndElement
	Attr         attributes.Attributes
	Data         *Data

	Next   *Element
	Prev   *Element
	Child  *Element
	Parent *Element
	// contains filtered or unexported fields
}

func (*Element) Assign

func (e *Element) Assign(elem *Element) error

func (*Element) DisplayAllXMLPaths

func (e *Element) DisplayAllXMLPaths() string

func (*Element) DisplayDebug

func (e *Element) DisplayDebug() string

func (*Element) FindTagFromData

func (e *Element) FindTagFromData(data string) []*Element

func (*Element) GetAttributes

func (e *Element) GetAttributes() attributes.Attributes

func (*Element) GetIndex

func (e *Element) GetIndex() int

GetIndex returns the index of the element in the list of elements or 0 if the element is not in a list

func (*Element) GetName

func (e *Element) GetName() string

func (*Element) GetPath

func (e *Element) GetPath() string

func (*Element) GetXMLTag

func (e *Element) GetXMLTag() []byte

func (*Element) IsEmpty

func (e *Element) IsEmpty() bool

func (*Element) Pretty

func (e *Element) Pretty(spacing int) string

func (*Element) SetAttributes

func (e *Element) SetAttributes(_ attributes.Attributes)

func (*Element) ToXML

func (e *Element) ToXML(spacing int) string

func (*Element) TransformToXML

func (e *Element) TransformToXML(buffer *saver.Buffer) error

func (*Element) XMLPath

func (e *Element) XMLPath() string

type Elements

type Elements []*Element

func (Elements) FindElementFromClass

func (e Elements) FindElementFromClass(class string) *Element

func (Elements) TransformToXML

func (e Elements) TransformToXML(buffer *saver.Buffer) error

type ListIndex

type ListIndex struct {
	Valid bool
	Idx   int
}

func (*ListIndex) Decrement

func (l *ListIndex) Decrement()

func (*ListIndex) FromIndex

func (l *ListIndex) FromIndex(idx int)

func (*ListIndex) Increment

func (l *ListIndex) Increment()

func (*ListIndex) Invalidate

func (l *ListIndex) Invalidate()

func (*ListIndex) IsValid

func (l *ListIndex) IsValid() bool

func (*ListIndex) ToIndex

func (l *ListIndex) ToIndex() int

type Tree

type Tree struct {
	_xml.Unmarshaler
	Root *Element
}

func (*Tree) Debug

func (t *Tree) Debug() string

func (*Tree) FindElementFromData

func (t *Tree) FindElementFromData(data string) []*Element

func (*Tree) Pretty

func (t *Tree) Pretty(space ...int) string

func (*Tree) ToXML

func (t *Tree) ToXML() string

func (*Tree) UnmarshalXML

func (t *Tree) UnmarshalXML(decoder *_xml.Decoder, s _xml.StartElement) error

func (*Tree) XMLPath

func (t *Tree) XMLPath() string

Directories

Path Synopsis

Jump to

Keyboard shortcuts

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