Re: [Simple-support] Deserializing Style-Tag
Brought to you by:
niallg
|
From: Niall G. - Y. <Nia...@yi...> - 2012-08-21 02:06:06
|
Yes it can, but you will have to create your own TreeStrategy. In Simple the "class" attribute is the default attribute used to store the Java class name. If you want to use this attribute you can do this.
TreeStrategy ts = new TreeStrategy("myIdAttributeName", "myClassAttributeName") // Default is TreeStrategy("id", "class")
Persister p = new Persister(ts);
This will allow you yo use the "class" attribute.
-----Original Message-----
From: Maxim Solodovnik [mailto:sol...@gm...]
Sent: Tuesday, 21 August 2012 11:55 AM
To: Niall Gallagher - Yieldbroker
Cc: M. D.; sim...@li...
Subject: Re: [Simple-support] Deserializing Style-Tag
I believe it is something like
<div class="button" style="..." ...></div>
can not be mapped directly to
@Root
class Div {
private String class; // <-- error is here }
can easily be implemented as
@Root
class Div {
@Attribute(name="class")
private String cssClass; // <-- no error }
something like this
On Tue, Aug 21, 2012 at 5:47 AM, Niall Gallagher - Yieldbroker <Nia...@yi...> wrote:
> Can you provide an example, I am not sure what you are talking about.
>
>
>
> From: M. D. [mailto:m....@we...]
> Sent: Monday, 20 August 2012 9:37 PM
> To: sim...@li...
> Subject: [Simple-support] Deserializing Style-Tag
>
>
>
> Hello,
>
>
>
> I would like to deserialize Style-tag of html with Simple. I noticed
> that the attribute "class" can't be mapped to an Instance variable in java.
>
> Is there any solution for that?
>
>
>
> Thanks in advance
>
>
> ----------------------------------------------------------------------
> --------
> Live Security Virtual Conference
> Exclusive live event will cover all the ways today's security and
> threat landscape has changed and how IT managers can respond.
> Discussions will include endpoint security, mobile security and the
> latest in malware threats.
> http://www.accelacomm.com/jaw/sfrnl04242012/114/50122263/
> _______________________________________________
> Simple-support mailing list
> Sim...@li...
> https://lists.sourceforge.net/lists/listinfo/simple-support
>
--
WBR
Maxim aka solomax
|