• Russ Cox's avatar
    encoding/xml: add wildcard support for collecting all attributes · c1a1328c
    Russ Cox authored
    - Like ",any" for elements, add ",any,attr" for attributes to allow
      a mop-up field that gets any otherwise unmapped attributes.
    - Map attributes to fields of type slice by extending the slice,
      just like for elements.
    - Allow storing an attribute into an xml.Attr directly, to provide
      a way to record the name.
    
    Combined, these three independent features allow
    
    	AllAttrs []Attr `xml:",any,attr"`
    
    to collect all attributes not otherwise spoken for in a particular struct.
    
    Tests based on CL 16292 by Charles Weill.
    
    Fixes #3633.
    
    Change-Id: I2d75817f17ca8752d7df188080a407836af92611
    Reviewed-on: https://go-review.googlesource.com/30946Reviewed-by: 's avatarQuentin Smith <quentin@golang.org>
    c1a1328c
Name
Last commit
Last update
..
ascii85 Loading commit data...
asn1 Loading commit data...
base32 Loading commit data...
base64 Loading commit data...
binary Loading commit data...
csv Loading commit data...
gob Loading commit data...
hex Loading commit data...
json Loading commit data...
pem Loading commit data...
xml Loading commit data...
encoding.go Loading commit data...