File: xmlbuilder.go

package info (click to toggle)
golang-github-christrenkamp-goxpath 1.0~alpha3%2Bgit20170922.c385f95-2
  • links: PTS, VCS
  • area: main
  • in suites: bookworm, forky, sid, trixie
  • size: 308 kB
  • sloc: sh: 16; makefile: 3; xml: 3
file content (25 lines) | stat: -rw-r--r-- 525 bytes parent folder | download | duplicates (2)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
package xmlbuilder

import (
	"encoding/xml"

	"github.com/ChrisTrenkamp/goxpath/tree"
)

//BuilderOpts supplies all the information needed to create an XML node.
type BuilderOpts struct {
	Dec          *xml.Decoder
	Tok          xml.Token
	NodeType     tree.NodeType
	NS           map[xml.Name]string
	Attrs        []*xml.Attr
	NodePos      int
	AttrStartPos int
}

//XMLBuilder is an interface for creating XML structures.
type XMLBuilder interface {
	tree.Node
	CreateNode(*BuilderOpts) XMLBuilder
	EndElem() XMLBuilder
}