struts-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Colin Sampaleanu <co...@Bspark.com>
Subject RE: [PROPOSAL] Integrating Struts with XML Data
Date Mon, 09 Oct 2000 15:33:24 GMT
> -----Original Message-----
> From: Craig R. McClanahan [mailto:Craig.McClanahan@eng.sun.com]
> Sent: October 9, 2000 2:27 AM
> To: struts-dev@jakarta.apache.org
> Subject: [PROPOSAL] Integrating Struts with XML Data
> 
> In the examples below, assume that a DOM object with the following
> structure is attached to the bean name "bean":
> 
>     <a b="1" c="2">
>         <d e="3" f="4"/>
>         <d e="5" f="6"/>
>     </a>
>     <a b="7" c="8">
>         <d e="9" f="10"/>
>         <d e="11" f="12"/>
>     </a>
> 
> Here's the proposal -- please let me know what you think:
> ...

Looks quite usable.

I have one question. What happens though if you have a child element that
has the same name as an attribute in the parent element?
     <a b="7" c="8">
         <b x="0" y="1"/>
         <d e="9" f="10"/>
         <d e="11" f="12"/>
     </a>
According to your proposal, a.b would refer to the attribute 'b' of element
'a'. How do I refer to the child element 'b' of element 'a'?



Mime
View raw message