xml

package
v0.12.1 Latest Latest
Warning

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

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

Documentation

Index

Constants

View Source
const (
	XMLStylesheet = `<?xml-stylesheet type="text/xsl" href="configuration.xsl"?>` + "\n"
)

Variables

This section is empty.

Functions

This section is empty.

Types

type Property

type Property struct {
	XMLName     xml.Name `xml:"property"`
	Name        string   `xml:"name"`
	Value       string   `xml:"value"`
	Description string   `xml:"description,omitempty"`
}

type XMLConfiguration

type XMLConfiguration struct {
	Configuration *configuration
	Header        string
}

func NewXMLConfiguration

func NewXMLConfiguration() *XMLConfiguration

func NewXMLConfigurationFromMap

func NewXMLConfigurationFromMap(properties map[string]string) *XMLConfiguration

func NewXMLConfigurationFromString

func NewXMLConfigurationFromString(xmlData string) (*XMLConfiguration, error)

func (*XMLConfiguration) AddPropertiesWithMap

func (x *XMLConfiguration) AddPropertiesWithMap(properties map[string]string)

func (*XMLConfiguration) AddProperty

func (x *XMLConfiguration) AddProperty(p Property)

func (*XMLConfiguration) AddPropertyWithString

func (x *XMLConfiguration) AddPropertyWithString(name, value, description string)

func (*XMLConfiguration) DeleteProperties

func (x *XMLConfiguration) DeleteProperties(names ...string)

func (*XMLConfiguration) GetProperty

func (x *XMLConfiguration) GetProperty(name string) (Property, bool)

func (*XMLConfiguration) Marshal

func (x *XMLConfiguration) Marshal() (string, error)

Jump to

Keyboard shortcuts

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