xmlutil

package
v0.1.0 Latest Latest
Warning

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

Go to latest
Published: Feb 25, 2023 License: Apache-2.0 Imports: 2 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func XMLName

func XMLName(local string, spaces ...string) xml.Name

XMLName is a shortcut for creating xml.Name, where typically you want at least a local name, and perhaps a namespace value as well.

Types

type PrefixMap

type PrefixMap map[string]string

PrefixMap is a prefix to namespce URI map

func NewPrefixMap

func NewPrefixMap(attrs ...xml.Attr) PrefixMap

NewPrefixMap returns a PrefixMap, containing the passed XML attributes

func (PrefixMap) Attr

func (m PrefixMap) Attr() (a []xml.Attr)

Attr returns the prefix map contents as a series of xmlns:<prefix>=<nsuri> attributes, sorted lexically by prefix.

func (PrefixMap) Namespace

func (m PrefixMap) Namespace(prefix string) string

Namespace returns the namespace URI for the given prefix

func (PrefixMap) Prefix

func (m PrefixMap) Prefix(nsURI string) (pfxes []string)

Prefix returns any prefixes found for the namespace URI

Jump to

Keyboard shortcuts

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