Documentation ¶
Overview ¶
Package xml is XML testing package that supports XML comparison utility. The package consists of ToStruct and StructToXML utils that help sort XML elements as per their nesting level. ToStruct function converts an XML document into a sorted tree node structure, while StructToXML converts the sorted XML nodes into a sorted XML document. SortXML function should be used to sort an XML document. It can be configured to ignore indentation
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
Types ¶
type Node ¶
type Node struct { Name xml.Name `json:",omitempty"` Children map[string][]*Node `json:",omitempty"` Text string `json:",omitempty"` Attr []xml.Attr `json:",omitempty"` // contains filtered or unexported fields }
A Node contains the values to be encoded or decoded.
func NewXMLElement ¶
NewXMLElement returns a pointer to a new Node initialized to default values.
Click to show internal directories.
Click to hide internal directories.