package
0.0.0-20171011075504-07f7db3ea99f
Repository: https://github.com/mattn/go.git
Documentation: pkg.go.dev
# Functions
CopyToken returns a copy of a Token.
Escape is like EscapeText but omits the error return value.
EscapeText writes to w the properly escaped XML equivalent of the plain text data s.
Marshal returns the XML encoding of v.
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.
NewDecoder creates a new XML parser reading from r.
NewEncoder returns a new encoder that writes to w.
NewTokenDecoder creates a new XML parser using an underlying token stream.
Unmarshal parses the XML-encoded data and stores the result in the value pointed to by v, which must be an arbitrary struct, slice, or string.
# Constants
Header is a generic XML header suitable for use with the output of Marshal.
# Variables
HTMLAutoClose is the set of HTML elements that should be considered to close automatically.
HTMLEntity is an entity map containing translations for the standard HTML entity characters.
# Structs
An Attr represents an attribute in an XML element (Name=Value).
A Decoder represents an XML parser reading a particular input stream.
An Encoder writes XML data to an output stream.
An EndElement represents an XML end element.
A Name represents an XML name (Local) annotated with a name space identifier (Space).
A ProcInst represents an XML processing instruction of the form <?target inst?>.
A StartElement represents an XML start element.
A SyntaxError represents a syntax error in the XML input stream.
A TagPathError represents an error in the unmarshaling process caused by the use of field tags with conflicting paths.
UnsupportedTypeError is returned when Marshal encounters a type that cannot be converted into XML.
# Interfaces
Marshaler is the interface implemented by objects that can marshal themselves into valid XML elements.
MarshalerAttr is the interface implemented by objects that can marshal themselves into valid XML attributes.
A Token is an interface holding one of the token types: StartElement, EndElement, CharData, Comment, ProcInst, or Directive.
A TokenReader is anything that can decode a stream of XML tokens, including a Decoder.
Unmarshaler is the interface implemented by objects that can unmarshal an XML element description of themselves.
UnmarshalerAttr is the interface implemented by objects that can unmarshal an XML attribute description of themselves.
# Type aliases
A CharData represents XML character data (raw text), in which XML escape sequences have been replaced by the characters they represent.
A Comment represents an XML comment of the form <!--comment-->.
A Directive represents an XML directive of the form <!text>.
An UnmarshalError represents an error in the unmarshaling process.