func SortXML(r io.Reader, ignoreIndentation bool) (string, error)
SortXML sorts the reader's XML elements
func StructToXML(e *xml.Encoder, node *XMLNode, sorted bool) error
StructToXML writes an XMLNode to a xml.Encoder as tokens.
A XMLNode contains the values to be encoded or decoded.
type XMLNode struct { Name xml.Name `json:",omitempty"` Children map[string][]*XMLNode `json:",omitempty"` Text string `json:",omitempty"` Attr []xml.Attr `json:",omitempty"` // contains filtered or unexported fields }
func NewXMLElement(name xml.Name) *XMLNode
NewXMLElement returns a pointer to a new XMLNode initialized to default values.
func XMLToStruct(d *xml.Decoder, s *xml.StartElement, ignoreIndentation bool) (*XMLNode, error)
XMLToStruct converts a xml.Decoder stream to XMLNode with nested values.
func (n *XMLNode) AddChild(child *XMLNode)
AddChild adds child to the XMLNode.