pbxml

package
v0.1.3 Latest Latest
Warning

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

Go to latest
Published: Jun 4, 2023 License: AGPL-3.0 Imports: 6 Imported by: 1

Documentation

Overview

Package pbxml implements the XML formats for a pathbuilder.

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func Load

func Load(src string) (pb pathbuilder.Pathbuilder, err error)

Load loads a pathbuilder in xml from src. Source can should be either a local path or a remote 'http://' or 'https://' url; see source.ReadAll.

func Marshal

func Marshal(pb pathbuilder.Pathbuilder) ([]byte, error)

Marshal marshals a pathbuilder as XML

func Unmarshal

func Unmarshal(data []byte) (pb pathbuilder.Pathbuilder, err error)

Unmarshal unmarshals a pathbuilder from XML

Types

type XMLPathbuilder

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

XMLPathbuilder is an XML representation of a Pathbuilder It implements xml.Marshaler and xml.Unmarshaler.

It intentionally does not expose any implementation details, as the format might change in the future.

func New

New creates a new XMLPathbuilder from a pathbuilder

func (XMLPathbuilder) MarshalXML

func (builder XMLPathbuilder) MarshalXML(e *xml.Encoder, start xml.StartElement) error

func (XMLPathbuilder) Pathbuilder

func (builder XMLPathbuilder) Pathbuilder() pathbuilder.Pathbuilder

func (*XMLPathbuilder) UnmarshalXML

func (builder *XMLPathbuilder) UnmarshalXML(d *xml.Decoder, start xml.StartElement) error

Jump to

Keyboard shortcuts

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