dom

package
v0.0.0-...-4490b9b Latest Latest
Warning

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

Go to latest
Published: Oct 12, 2023 License: Apache-2.0 Imports: 3 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Attr

type Attr struct {
	Name  xml.Name // Attribute namespace and name.
	Value string   // Attribute value.
}

type Document

type Document struct {
	PrettyPrint bool
	Indentation string
	DocType     bool
	// contains filtered or unexported fields
}

func CreateDocument

func CreateDocument() *Document

func (*Document) SetRoot

func (doc *Document) SetRoot(node *Element)

func (*Document) String

func (doc *Document) String() string

type Element

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

func CreateElement

func CreateElement(n string) *Element

func (*Element) AddChild

func (node *Element) AddChild(child *Element) *Element

func (*Element) Bytes

func (node *Element) Bytes(out *bytes.Buffer, indent bool, indentType string, level int)

func (*Element) DeclareNamespace

func (node *Element) DeclareNamespace(ns Namespace) *Element

Add a namespace declaration to this node

func (*Element) DeclaredNamespaces

func (node *Element) DeclaredNamespaces() []*Namespace

func (*Element) RemoveChild

func (node *Element) RemoveChild(child *Element) *Element

func (*Element) SetAttr

func (node *Element) SetAttr(name string, value string) *Element

func (*Element) SetContent

func (node *Element) SetContent(content string) *Element

func (*Element) SetNamespace

func (node *Element) SetNamespace(prefix string, uri string)

func (*Element) SetParent

func (node *Element) SetParent(parent *Element) *Element

func (*Element) String

func (node *Element) String() string

type Namespace

type Namespace struct {
	Prefix string
	Uri    string
}

func (*Namespace) SetTo

func (ns *Namespace) SetTo(node *Element)

Jump to

Keyboard shortcuts

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