Commit bc4891a0 authored by Paul Warren's avatar Paul Warren
Browse files

Merge branch 'master' of

parents 85412913 726e67ca
= Go XML tools =
Go XML tools
== ==
This is a fork of the standard encoding/xml with a number of changes, primarily
to deal with elements and attributes containing QName values.
In addition, it provides Encoder.XMLDeclaration to control the inclusion of an
XML declaration in the output.
== ==
This package provides a QName type that implements the following interfaces
from the above package:
......@@ -75,6 +75,15 @@ func UnmarshallQNameAttr(d *xml.Decoder, s xml.StartElement, a QName) (QName, er
return q, nil
func (qname *QName) UnmarshalXMLAttr(d *xml.Decoder, attr xml.Attr) error {
q, err := NewFromString(d.NamespaceBindings(), attr.Value)
if err != nil {
return err
*qname = q
return nil
func (qname *QName) MarshalXML(e *xml.Encoder, start xml.StartElement) error {
prefix := e.GetPrefix(qname.Namespace)
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment