File tree Expand file tree Collapse file tree 2 files changed +9
-7
lines changed Expand file tree Collapse file tree 2 files changed +9
-7
lines changed Original file line number Diff line number Diff line change @@ -73,10 +73,11 @@ type SeriesInfo struct {
73
73
74
74
// Reference is the entire <reference> structure.
75
75
type Reference struct {
76
- XMLName xml.Name `xml:"reference"`
77
- Anchor string `xml:"anchor,attr"`
78
- Front Front `xml:"front"`
79
- Format * Format `xml:"format,omitempty"`
80
- Target string `xml:"target,attr"`
81
- Series * SeriesInfo `xml:"seriesInfo,omitempty"`
76
+ XMLName xml.Name `xml:"reference"`
77
+ Anchor string `xml:"anchor,attr"`
78
+ Front Front `xml:"front"`
79
+ Format * Format `xml:"format,omitempty"`
80
+ Target string `xml:"target,attr"`
81
+ Series * SeriesInfo `xml:"seriesInfo,omitempty"`
82
+ RefContent string `xml:"refcontent"`
82
83
}
Original file line number Diff line number Diff line change @@ -14,9 +14,10 @@ func TestReference(t *testing.T) {
14
14
</author>
15
15
<date month='February' year='2019'/>
16
16
</front>
17
+ <refcontent>blah</refcontent>
17
18
</reference>
18
19
` )
19
- expect := `<reference anchor="IANA" target="https://www.iana.org/assignments/media-types/media-types.xhtml"><front><title>IANA Media Types</title><author><organization>IANA</organization></author><date year="2019" month="February"></date></front></reference>`
20
+ expect := `<reference anchor="IANA" target="https://www.iana.org/assignments/media-types/media-types.xhtml"><front><title>IANA Media Types</title><author><organization>IANA</organization></author><date year="2019" month="February"></date></front><refcontent>blah</refcontent>< /reference>`
20
21
21
22
var x Reference
22
23
if err := xml .Unmarshal (in , & x ); err != nil {
You can’t perform that action at this time.
0 commit comments