Examples using... "encoding/xml"
Recent
Package xml implements a simple XML 1.0 parser that
understands XML name spaces.
Package xml implements a simple XML 1.0 parser that
understands XML name spaces.
This example demonstrates unmarshaling an XML excerpt into a value with
some preset fields. Note that the Phone field isn't modified and that
the XML <Company> element is ignored. Also, the Groups field is assigned
considering the element path provided in its tag.
MarshalIndent works like Marshal, but each XML element begins on a new
indented line that starts with prefix and is followed by one or more
copies of indent according to the nesting depth.
An Encoder writes XML data to an output stream.
Go offers built-in support for XML and XML-like formats with the encoding.xml package.