xml prefs should be part of API

This commit is contained in:
Mike Farah
2022-10-25 14:27:16 +11:00
parent c62e18f9b2
commit 24bbffd71e
9 changed files with 54 additions and 53 deletions
+29
View File
@@ -0,0 +1,29 @@
package yqlib
type XmlPreferences struct {
AttributePrefix string
ContentName string
StrictMode bool
KeepNamespace bool
UseRawToken bool
ProcInstPrefix string
DirectiveName string
SkipProcInst bool
SkipDirectives bool
}
func NewDefaultXmlPreferences() XmlPreferences {
return XmlPreferences{
AttributePrefix: "+",
ContentName: "+content",
StrictMode: false,
KeepNamespace: true,
UseRawToken: false,
ProcInstPrefix: "+p_",
DirectiveName: "+directive",
SkipProcInst: false,
SkipDirectives: false,
}
}
var ConfiguredXMLPreferences = NewDefaultXmlPreferences()