Re: [Simple-support] XML file path in deserialized objects
Brought to you by:
niallg
|
From: Niall G. <gal...@ya...> - 2012-04-10 12:02:47
|
File should work automatically, what happens when u use @Element or @Attribute?
--- On Tue, 10/4/12, Aaron Digulla <di...@he...> wrote:
From: Aaron Digulla <di...@he...>
Subject: Re: [Simple-support] XML file path in deserialized objects
To: sim...@li...
Received: Tuesday, 10 April, 2012, 3:07 AM
Zitat von Jens Wurster <jw...@to...>:
> how can I get the xml file path (or object) in deserialized objects?
Write a helper/factory method that calls serializer.read(), sets the
field and then returns the new instance.
Regards,
> For example:
>
> Test obj = serializer.read(Test.class, new File("test.xml"));
>
> @Root
> public class Test implements Serializable {
>
> @Attribute
> private String id;
>
> @File
> private File file; // This should contain the file path or object
> of the xml file
>
> public String getId() {
> return id;
> }
> }
>
> Thanks and
> best regards
>
> Jens
>
> ------------------------------------------------------------------------------
> Better than sec? Nothing is better than sec when it comes to
> monitoring Big Data applications. Try Boundary one-second
> resolution app monitoring today. Free.
> http://p.sf.net/sfu/Boundary-dev2dev
> _______________________________________________
> Simple-support mailing list
> Sim...@li...
> https://lists.sourceforge.net/lists/listinfo/simple-support
>
>
--
Aaron "Optimizer" Digulla a.k.a. Philmann Dark
"It's not the universe that's limited, it's our imagination.
Follow me and I'll show you something beyond the limits."
http://www.pdark.de/ http://blog.pdark.de/
------------------------------------------------------------------------------
Better than sec? Nothing is better than sec when it comes to
monitoring Big Data applications. Try Boundary one-second
resolution app monitoring today. Free.
http://p.sf.net/sfu/Boundary-dev2dev
_______________________________________________
Simple-support mailing list
Sim...@li...
https://lists.sourceforge.net/lists/listinfo/simple-support
|