You are viewing a plain text version of this content. The canonical link for it is here.
Posted to issues@commons.apache.org by "Volker Karlmeier (JIRA)" <ji...@apache.org> on 2008/11/18 17:39:44 UTC
[jira] Commented: (DIGESTER-105) [digester] Need to process
[attribute id="name"]somename[/attribute]
[ https://issues.apache.org/jira/browse/DIGESTER-105?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=12648644#action_12648644 ]
Volker Karlmeier commented on DIGESTER-105:
-------------------------------------------
Hi all,
using xml rules, I managed this by changing the order of the xml-tags:
Example:
config.xml:
<address type="cc">volker@magiccode.eu</address>
rules.xml:
<pattern value="address">
<object-create-rule classname="my.package.MailAddress" />
<!-- Attention ! bean-property-setter-rule and set-next-rule are called
in reverse order !!
-->
<set-properties-rule />
<set-next-rule methodname="addMailAddress" paramtype="my.package.MailAddress" />
<bean-property-setter-rule propertyname="address" />
</pattern>
Hope that might help in any way.....
Regards
Volker
> [digester] Need to process [attribute id="name"]somename[/attribute]
> --------------------------------------------------------------------
>
> Key: DIGESTER-105
> URL: https://issues.apache.org/jira/browse/DIGESTER-105
> Project: Commons Digester
> Issue Type: Improvement
> Affects Versions: 1.6
> Environment: Operating System: other
> Platform: Other
> Reporter: Simon Kitching
> Priority: Minor
> Attachments: code.zip, code.zip, code.zip
>
>
> It is reasonably common to encounter xml like
> <person>
> <attribute id='name'>somename</attribute>
> <attribute id='age'>99</attribute>
> ..
> </person>
> Currently there is no built-in rule to support this in Digester:
> BeanPropertySetterRule supports <name>somename</name>
> SetPropertyRule supports <attribute id='name' value='somename'/>.
> SetPropertiesRule supports <attribute name='somename'/>
> but nothing supports the first syntax listed above.
--
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.