]> Cypherpunks repositories - gostls13.git/commitdiff
encoding/xml: update docs to follow convention
authorSam Whited <sam@samwhited.com>
Wed, 6 Jul 2016 01:06:00 +0000 (20:06 -0500)
committerIan Lance Taylor <iant@golang.org>
Wed, 6 Jul 2016 17:19:45 +0000 (17:19 +0000)
Fixes #8833

Change-Id: I4523a1de112ed02371504e27882659bce8028a45
Reviewed-on: https://go-review.googlesource.com/24745
Reviewed-by: Ian Lance Taylor <iant@golang.org>
Run-TryBot: Ian Lance Taylor <iant@golang.org>
TryBot-Result: Gobot Gobot <gobot@golang.org>

src/encoding/xml/marshal.go
src/encoding/xml/read.go

index 609c790520fbf6e68b49c4a397ffedc266fc4b3d..abb078ce270986a56e4473d8829f1b52aa01832a 100644 (file)
@@ -33,7 +33,7 @@ const (
 //
 // The name for the XML elements is taken from, in order of preference:
 //     - the tag on the XMLName field, if the data is a struct
-//     - the value of the XMLName field of type xml.Name
+//     - the value of the XMLName field of type Name
 //     - the tag of the struct field used to obtain the data
 //     - the name of the struct field used to obtain the data
 //     - the name of the marshalled type
index ee725cb8bb05a705dd5f7e832235660f704fa562..937432e3a7ec75ecde0bcfd4bd5afe3ddfaa4081 100644 (file)
@@ -39,7 +39,7 @@ import (
 //      ",innerxml", Unmarshal accumulates the raw XML nested inside the
 //      element in that field. The rest of the rules still apply.
 //
-//   * If the struct has a field named XMLName of type xml.Name,
+//   * If the struct has a field named XMLName of type Name,
 //      Unmarshal records the element name in that field.
 //
 //   * If the XMLName field has an associated tag of the form
@@ -105,8 +105,8 @@ import (
 // interpreting the string value in decimal. There is no check for
 // overflow.
 //
-// Unmarshal maps an XML element to an xml.Name by recording the
-// element name.
+// Unmarshal maps an XML element to a Name by recording the element
+// name.
 //
 // Unmarshal maps an XML element to a pointer by setting the pointer
 // to a freshly allocated value and then mapping the element to that value.
@@ -115,13 +115,13 @@ func Unmarshal(data []byte, v interface{}) error {
        return NewDecoder(bytes.NewReader(data)).Decode(v)
 }
 
-// Decode works like xml.Unmarshal, except it reads the decoder
+// Decode works like Unmarshal, except it reads the decoder
 // stream to find the start element.
 func (d *Decoder) Decode(v interface{}) error {
        return d.DecodeElement(v, nil)
 }
 
-// DecodeElement works like xml.Unmarshal except that it takes
+// DecodeElement works like Unmarshal except that it takes
 // a pointer to the start XML element to decode into v.
 // It is useful when a client reads some raw XML tokens itself
 // but also wants to defer to Unmarshal for some elements.