File tree 2 files changed +8
-1
lines changed
2 files changed +8
-1
lines changed Original file line number Diff line number Diff line change @@ -48,6 +48,10 @@ import (
48
48
// the given name (and, optionally, namespace) or else Unmarshal
49
49
// returns an error.
50
50
//
51
+ // - If the XMLName field contains an XML namespace, it may also
52
+ // optionally specify a namespace prefix in the form of
53
+ // "namespace-URL prefix:name".
54
+ //
51
55
// - If the XML element has an attribute whose name matches a
52
56
// struct field name with an associated tag containing ",attr" or
53
57
// the explicit name in a struct field tag of the form "name,attr",
Original file line number Diff line number Diff line change @@ -36,7 +36,10 @@ func (e *SyntaxError) Error() string {
36
36
// with a namespace identifier (Space).
37
37
// In tokens returned by [Decoder.Token], the Space identifier
38
38
// is given as a canonical URL, not the short prefix used
39
- // in the document being parsed.
39
+ // in the document being parsed. If Local is prefixed in
40
+ // the form of "prefix:name", this package will attempt to
41
+ // use the prefix instead of a fully-qualified namespace URL
42
+ // when marshaling.
40
43
type Name struct {
41
44
Space , Local string
42
45
}
You can’t perform that action at this time.
0 commit comments