xml

package
v1.5.49 Latest Latest
Warning

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

Go to latest
Published: Sep 24, 2025 License: Apache-2.0 Imports: 3 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func AppendElement

func AppendElement(parent *etree.Element, el *etree.Element, alternatives ...string)

func CreateSimpleElementIfNotExists

func CreateSimpleElementIfNotExists(parent *etree.Element, name string, value string, afterElements ...string) (el *etree.Element, exists bool)

func InsertElement

func InsertElement(parent *etree.Element, el *etree.Element, indexCheck func(el *etree.Element) bool, alternatives ...string)

func InsertElementByAttribute

func InsertElementByAttribute(parent *etree.Element, el *etree.Element, attribute string, alternatives ...string)

func InsertElementByAttributeNumber

func InsertElementByAttributeNumber(parent *etree.Element, el *etree.Element, attribute string, number *matter.Number, alternatives ...string)

func InsertElementByName

func InsertElementByName(parent *etree.Element, el *etree.Element, alternatives ...string)

func PrependAttribute

func PrependAttribute(el *etree.Element, name string, value string, after ...string)

func ReadSimpleElement

func ReadSimpleElement(parent *etree.Element, name string) (value string, ok bool)

func RemoveElements

func RemoveElements(parent *etree.Element, elementNames ...string)

func SetNonexistentAttr

func SetNonexistentAttr(el *etree.Element, name string, value string) *etree.Attr

Sets an attribute value, as long as it's not already set

func SetOrCreateSimpleElement

func SetOrCreateSimpleElement(parent *etree.Element, name string, value string, afterElements ...string) *etree.Element

func SetOrCreateSimpleNumber

func SetOrCreateSimpleNumber(parent *etree.Element, name string, value string, afterElements ...string) *etree.Element

Types

This section is empty.

Jump to

Keyboard shortcuts

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