• 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
.github Loading commit data...
api Loading commit data...
doc Loading commit data...
lib/time Loading commit data...
misc Loading commit data...
src Loading commit data...
test Loading commit data...
.gitattributes Loading commit data...
.gitignore Loading commit data...
AUTHORS Loading commit data...
CONTRIBUTING.md Loading commit data...
CONTRIBUTORS Loading commit data...
LICENSE Loading commit data...
PATENTS Loading commit data...
README.md Loading commit data...
favicon.ico Loading commit data...
robots.txt Loading commit data...