mirror of
https://github.com/mikefarah/yq.git
synced 2025-01-12 11:05:37 +00:00
wipt
This commit is contained in:
parent
4571ec825f
commit
dbe3921f5d
@ -17,7 +17,10 @@ type xmlDecoder struct {
|
||||
}
|
||||
|
||||
func NewXmlDecoder(reader io.Reader, attributePrefix string, contentPrefix string) Decoder {
|
||||
return &xmlDecoder{reader: reader, attributePrefix: attributePrefix, contentPrefix: "c", finished: false}
|
||||
if contentPrefix == "" {
|
||||
contentPrefix = "content"
|
||||
}
|
||||
return &xmlDecoder{reader: reader, attributePrefix: attributePrefix, contentPrefix: contentPrefix, finished: false}
|
||||
}
|
||||
|
||||
func (dec *xmlDecoder) createSequence(nodes []*xmlNode) (*yaml.Node, error) {
|
||||
|
@ -93,7 +93,7 @@ func (s *streamEvaluator) EvaluateFiles(expression string, filenames []string, p
|
||||
func (s *streamEvaluator) Evaluate(filename string, reader io.Reader, node *ExpressionNode, printer Printer, leadingContent string) (uint, error) {
|
||||
|
||||
var currentIndex uint
|
||||
decoder := NewXmlDecoder(reader, "+", "c")
|
||||
decoder := NewXmlDecoder(reader, "+", "")
|
||||
for {
|
||||
var dataBucket yaml.Node
|
||||
errorReading := decoder.Decode(&dataBucket)
|
||||
|
Loading…
Reference in New Issue
Block a user