Debian Codegraph @

parsing/xml/xml.go

raw symbols SCIP
1 package xmlscip-go gomod github.com/tomwright/dasel/v3 . `github.com/tomwright/dasel/v3/parsing/xml`/
2
3 import (
4 "github.com/tomwright/dasel/v3/parsingscip-go gomod github.com/tomwright/dasel/v3 . `github.com/tomwright/dasel/v3/parsing`/"
5 )
6
7 const (
8 // XML represents the XML file format.
9 XMLscip-go gomod github.com/tomwright/dasel/v3 . `github.com/tomwright/dasel/v3/parsing/xml`/XML. parsingscip-go gomod github.com/tomwright/dasel/v3 . `github.com/tomwright/dasel/v3/parsing`/.Formatscip-go gomod github.com/tomwright/dasel/v3 . `github.com/tomwright/dasel/v3/parsing`/Format# = "xml"
10 )
11
12 // xmlChildOrderKey is the metadata key for preserving child element
13 // document order during XML round-trips. Value type: []string.
14 const xmlChildOrderKeyscip-go gomod github.com/tomwright/dasel/v3 . `github.com/tomwright/dasel/v3/parsing/xml`/xmlChildOrderKey. = "xml_child_order"
15
16 var _ parsingscip-go gomod github.com/tomwright/dasel/v3 . `github.com/tomwright/dasel/v3/parsing`/.Readerscip-go gomod github.com/tomwright/dasel/v3 . `github.com/tomwright/dasel/v3/parsing`/Reader# = (*xmlReaderscip-go gomod github.com/tomwright/dasel/v3 . `github.com/tomwright/dasel/v3/parsing/xml`/xmlReader#)(nil)
17 var _ parsingscip-go gomod github.com/tomwright/dasel/v3 . `github.com/tomwright/dasel/v3/parsing`/.Writerscip-go gomod github.com/tomwright/dasel/v3 . `github.com/tomwright/dasel/v3/parsing`/Writer# = (*xmlWriterscip-go gomod github.com/tomwright/dasel/v3 . `github.com/tomwright/dasel/v3/parsing/xml`/xmlWriter#)(nil)
18
19 func initscip-go gomod github.com/tomwright/dasel/v3 . `github.com/tomwright/dasel/v3/parsing/xml`/init().() {
20 parsingscip-go gomod github.com/tomwright/dasel/v3 . `github.com/tomwright/dasel/v3/parsing`/.RegisterReaderscip-go gomod github.com/tomwright/dasel/v3 . `github.com/tomwright/dasel/v3/parsing`/RegisterReader().(XMLscip-go gomod github.com/tomwright/dasel/v3 . `github.com/tomwright/dasel/v3/parsing/xml`/XML., newXMLReaderscip-go gomod github.com/tomwright/dasel/v3 . `github.com/tomwright/dasel/v3/parsing/xml`/newXMLReader().)
21 parsingscip-go gomod github.com/tomwright/dasel/v3 . `github.com/tomwright/dasel/v3/parsing`/.RegisterWriterscip-go gomod github.com/tomwright/dasel/v3 . `github.com/tomwright/dasel/v3/parsing`/RegisterWriter().(XMLscip-go gomod github.com/tomwright/dasel/v3 . `github.com/tomwright/dasel/v3/parsing/xml`/XML., newXMLWriterscip-go gomod github.com/tomwright/dasel/v3 . `github.com/tomwright/dasel/v3/parsing/xml`/newXMLWriter().)
22 }
23
24 type xmlAttrscip-go gomod github.com/tomwright/dasel/v3 . `github.com/tomwright/dasel/v3/parsing/xml`/xmlAttr# struct {
25 Namescip-go gomod github.com/tomwright/dasel/v3 . `github.com/tomwright/dasel/v3/parsing/xml`/xmlAttr#Name. string
26 Valuescip-go gomod github.com/tomwright/dasel/v3 . `github.com/tomwright/dasel/v3/parsing/xml`/xmlAttr#Value. string
27 }
28
29 type xmlProcessingInstructionscip-go gomod github.com/tomwright/dasel/v3 . `github.com/tomwright/dasel/v3/parsing/xml`/xmlProcessingInstruction# struct {
30 Targetscip-go gomod github.com/tomwright/dasel/v3 . `github.com/tomwright/dasel/v3/parsing/xml`/xmlProcessingInstruction#Target. string
31 Valuescip-go gomod github.com/tomwright/dasel/v3 . `github.com/tomwright/dasel/v3/parsing/xml`/xmlProcessingInstruction#Value. string
32 }
33
34 type xmlCommentscip-go gomod github.com/tomwright/dasel/v3 . `github.com/tomwright/dasel/v3/parsing/xml`/xmlComment# struct {
35 Textscip-go gomod github.com/tomwright/dasel/v3 . `github.com/tomwright/dasel/v3/parsing/xml`/xmlComment#Text. string
36 }
37
38 type xmlElementscip-go gomod github.com/tomwright/dasel/v3 . `github.com/tomwright/dasel/v3/parsing/xml`/xmlElement# struct {
39 Namescip-go gomod github.com/tomwright/dasel/v3 . `github.com/tomwright/dasel/v3/parsing/xml`/xmlElement#Name. string
40 Attrsscip-go gomod github.com/tomwright/dasel/v3 . `github.com/tomwright/dasel/v3/parsing/xml`/xmlElement#Attrs. []xmlAttrscip-go gomod github.com/tomwright/dasel/v3 . `github.com/tomwright/dasel/v3/parsing/xml`/xmlAttr#
41 Childrenscip-go gomod github.com/tomwright/dasel/v3 . `github.com/tomwright/dasel/v3/parsing/xml`/xmlElement#Children. []*xmlElementscip-go gomod github.com/tomwright/dasel/v3 . `github.com/tomwright/dasel/v3/parsing/xml`/xmlElement#
42 Contentscip-go gomod github.com/tomwright/dasel/v3 . `github.com/tomwright/dasel/v3/parsing/xml`/xmlElement#Content. string
43 ProcessingInstructionsscip-go gomod github.com/tomwright/dasel/v3 . `github.com/tomwright/dasel/v3/parsing/xml`/xmlElement#ProcessingInstructions. []*xmlProcessingInstructionscip-go gomod github.com/tomwright/dasel/v3 . `github.com/tomwright/dasel/v3/parsing/xml`/xmlProcessingInstruction#
44 Commentsscip-go gomod github.com/tomwright/dasel/v3 . `github.com/tomwright/dasel/v3/parsing/xml`/xmlElement#Comments. []*xmlCommentscip-go gomod github.com/tomwright/dasel/v3 . `github.com/tomwright/dasel/v3/parsing/xml`/xmlComment#
45 useChildrenOnlyscip-go gomod github.com/tomwright/dasel/v3 . `github.com/tomwright/dasel/v3/parsing/xml`/xmlElement#useChildrenOnly. bool
46 compactscip-go gomod github.com/tomwright/dasel/v3 . `github.com/tomwright/dasel/v3/parsing/xml`/xmlElement#compact. bool
47 depthscip-go gomod github.com/tomwright/dasel/v3 . `github.com/tomwright/dasel/v3/parsing/xml`/xmlElement#depth. int // Tracks nesting depth for proper indentation
48 }
49
50 // appendChild appends child's children (if useChildrenOnly) or the child itself.
51 func (el *xmlElementscip-go gomod github.com/tomwright/dasel/v3 . `github.com/tomwright/dasel/v3/parsing/xml`/xmlElement#) appendChildscip-go gomod github.com/tomwright/dasel/v3 . `github.com/tomwright/dasel/v3/parsing/xml`/xmlElement#appendChild().(child *xmlElementscip-go gomod github.com/tomwright/dasel/v3 . `github.com/tomwright/dasel/v3/parsing/xml`/xmlElement#) {
52 if child.useChildrenOnlyscip-go gomod github.com/tomwright/dasel/v3 . `github.com/tomwright/dasel/v3/parsing/xml`/xmlElement#useChildrenOnly. {
53 el.Childrenscip-go gomod github.com/tomwright/dasel/v3 . `github.com/tomwright/dasel/v3/parsing/xml`/xmlElement#Children. = append(el.Childrenscip-go gomod github.com/tomwright/dasel/v3 . `github.com/tomwright/dasel/v3/parsing/xml`/xmlElement#Children., child.Childrenscip-go gomod github.com/tomwright/dasel/v3 . `github.com/tomwright/dasel/v3/parsing/xml`/xmlElement#Children....)
54 } else {
55 el.Childrenscip-go gomod github.com/tomwright/dasel/v3 . `github.com/tomwright/dasel/v3/parsing/xml`/xmlElement#Children. = append(el.Childrenscip-go gomod github.com/tomwright/dasel/v3 . `github.com/tomwright/dasel/v3/parsing/xml`/xmlElement#Children., child)
56 }
57 }