Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Support
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
G
go
Project overview
Project overview
Details
Activity
Releases
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Issues
0
Issues
0
List
Boards
Labels
Milestones
Merge Requests
0
Merge Requests
0
Analytics
Analytics
Repository
Value Stream
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Create a new issue
Commits
Issue Boards
Open sidebar
Kirill Smelkov
go
Commits
fd9c9951
Commit
fd9c9951
authored
Jan 23, 2012
by
Gustavo Niemeyer
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
encoding/xml: minor doc fixup
R=golang-dev, adg CC=golang-dev
https://golang.org/cl/5564046
parent
abd5bd7d
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
7 additions
and
7 deletions
+7
-7
src/pkg/encoding/xml/marshal.go
src/pkg/encoding/xml/marshal.go
+4
-5
src/pkg/encoding/xml/read.go
src/pkg/encoding/xml/read.go
+3
-2
No files found.
src/pkg/encoding/xml/marshal.go
View file @
fd9c9951
...
...
@@ -15,14 +15,13 @@ import (
)
const
(
// A generic XML header suitable for use with the output of Marshal
and
//
MarshalIndent. This is not automatically added to any output of this
//
package,
it is provided as a convenience.
// A generic XML header suitable for use with the output of Marshal
.
//
This is not automatically added to any output of this package,
// it is provided as a convenience.
Header
=
`<?xml version="1.0" encoding="UTF-8"?>`
+
"
\n
"
)
// A Marshaler can produce well-formatted XML representing its internal state.
// It is used by both Marshal and MarshalIndent.
type
Marshaler
interface
{
MarshalXML
()
([]
byte
,
error
)
}
...
...
@@ -368,7 +367,7 @@ func (s *parentStack) push(parents []string) {
s
.
stack
=
append
(
s
.
stack
,
parents
...
)
}
// A MarshalXMLError is returned when Marshal
or MarshalIndent encounter
a type
// A MarshalXMLError is returned when Marshal
encounters
a type
// that cannot be converted into XML.
type
UnsupportedTypeError
struct
{
Type
reflect
.
Type
...
...
src/pkg/encoding/xml/read.go
View file @
fd9c9951
...
...
@@ -78,8 +78,9 @@ import (
// field tag.
//
// Because Unmarshal uses the reflect package, it can only assign
// to exported (upper case) fields. Unmarshal uses a case-insensitive
// comparison to match XML element names to struct field names.
// to exported (upper case) fields. Unmarshal uses a case-sensitive
// comparison to match XML element names to tag values and struct
// field names.
//
// Unmarshal maps an XML element to a struct using the following rules.
// In the rules, the tag of a field refers to the value associated with the
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment