Rietveld Code Review Tool
Help | Bug tracker | Discussion group | Source code | Sign in
(17361)

Issue 7227056: code review 7227056: encoding/xml: name space bug fixes (Closed)

Can't Edit
Can't Publish+Mail
Start Review
Created:
11 years, 2 months ago by rsc
Modified:
11 years, 1 month ago
Reviewers:
CC:
golang-dev, bradfitz
Visibility:
Public.

Description

encoding/xml: name space bug fixes If two fields have the same name but different explicit name spaces, treat as non-conflicting. This allows parsing common XML formats that have ns1:tag and ns2:tag in the same XML element. Fixes issue 4691. Allow setting the default name space for unadorned tags, by writing to Decoder.DefaultSpace. This allows turned the job of parsing common XML formats that have tag and ns2:tag in the same XML element into the first case by setting DefaultSpace="ns1". Fixes issue 3703. Use name space attributes when decoding. Attach name space to attributes when encoding. Could be done with fewer annotations, but semantically correct as is. Fixes issue 3526.

Patch Set 1 #

Patch Set 2 : diff -r 1eadf11dd1b7 https://code.google.com/p/go/ #

Patch Set 3 : diff -r 7b6b3b170d9a https://code.google.com/p/go/ #

Patch Set 4 : diff -r 7b6b3b170d9a https://code.google.com/p/go/ #

Total comments: 1

Patch Set 5 : diff -r 672613a06ab4 https://code.google.com/p/go/ #

Unified diffs Side-by-side diffs Delta from patch set Stats (+235 lines, -2 lines) Patch
M src/pkg/encoding/xml/marshal.go View 1 2 3 2 chunks +15 lines, -0 lines 0 comments Download
M src/pkg/encoding/xml/read.go View 1 2 2 chunks +2 lines, -2 lines 0 comments Download
M src/pkg/encoding/xml/read_test.go View 1 2 3 2 chunks +208 lines, -0 lines 0 comments Download
M src/pkg/encoding/xml/typeinfo.go View 1 2 1 chunk +3 lines, -0 lines 0 comments Download
M src/pkg/encoding/xml/xml.go View 1 2 3 2 chunks +7 lines, -0 lines 0 comments Download

Messages

Total messages: 3
rsc
Hello golang-dev@googlegroups.com, I'd like you to review this change to https://code.google.com/p/go/
11 years, 1 month ago (2013-03-12 05:16:07 UTC) #1
bradfitz
LGTM https://codereview.appspot.com/7227056/diff/8001/src/pkg/encoding/xml/read_test.go File src/pkg/encoding/xml/read_test.go (right): https://codereview.appspot.com/7227056/diff/8001/src/pkg/encoding/xml/read_test.go#newcode404 src/pkg/encoding/xml/read_test.go:404: type Tables struct { cute
11 years, 1 month ago (2013-03-12 11:30:24 UTC) #2
rsc
11 years, 1 month ago (2013-03-12 15:46:57 UTC) #3
*** Submitted as https://code.google.com/p/go/source/detail?r=a364be6bc34f ***

encoding/xml: name space bug fixes

If two fields have the same name but different explicit name spaces,
treat as non-conflicting. This allows parsing common XML formats
that have ns1:tag and ns2:tag in the same XML element.
Fixes issue 4691.

Allow setting the default name space for unadorned tags, by
writing to Decoder.DefaultSpace. This allows turned the job of
parsing common XML formats that have tag and ns2:tag in the
same XML element into the first case by setting DefaultSpace="ns1".
Fixes issue 3703.

Use name space attributes when decoding.
Attach name space to attributes when encoding.
Could be done with fewer annotations, but semantically correct as is.
Fixes issue 3526.

R=golang-dev, bradfitz
CC=golang-dev
https://codereview.appspot.com/7227056
Sign in to reply to this message.

Powered by Google App Engine
RSS Feeds Recent Issues | This issue
This is Rietveld f62528b