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 ¶
func New(pb pathbuilder.Pathbuilder) XMLPathbuilder
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
Click to show internal directories.
Click to hide internal directories.