Details
-
Improvement
-
Status: Closed
-
Minor
-
Resolution: Fixed
-
None
-
None
-
None
-
1.1-rc-1
Description
A common groovy style is to allow setting of things using assignment. The groovy.util.Node objects, produced by XmlParser, have accessors which look like GPath with a little enhancement for attributes: the selector name must be quoted (but see issue http://jira.codehaus.org/browse/GROOVY-2233 ) and must start with an "@"; for example: xxx.subnode_name.'@attr_name'
The part of the implementation that allows "setting" of these by using assignment is failing. Failing example:
aNode.'@attrName' = 'new value'
If the attribute is not already present, this gives a message "no field named attrName found, rather than doing the right thing of adding (or updating) that attribute.