simple-support Mailing List for Simple (Page 72)
Brought to you by:
niallg
You can subscribe to this list here.
| 2007 |
Jan
|
Feb
(2) |
Mar
(2) |
Apr
(13) |
May
(13) |
Jun
(27) |
Jul
(4) |
Aug
(14) |
Sep
(7) |
Oct
|
Nov
(6) |
Dec
(24) |
|---|---|---|---|---|---|---|---|---|---|---|---|---|
| 2008 |
Jan
|
Feb
(21) |
Mar
(10) |
Apr
(15) |
May
(24) |
Jun
(24) |
Jul
(30) |
Aug
(5) |
Sep
(19) |
Oct
(27) |
Nov
(16) |
Dec
(24) |
| 2009 |
Jan
(34) |
Feb
(24) |
Mar
(35) |
Apr
(26) |
May
(8) |
Jun
(17) |
Jul
(28) |
Aug
(31) |
Sep
(36) |
Oct
(35) |
Nov
(20) |
Dec
(16) |
| 2010 |
Jan
(40) |
Feb
(21) |
Mar
(47) |
Apr
(45) |
May
(34) |
Jun
(68) |
Jul
(46) |
Aug
(39) |
Sep
(47) |
Oct
(20) |
Nov
(42) |
Dec
(13) |
| 2011 |
Jan
(41) |
Feb
(16) |
Mar
(32) |
Apr
(44) |
May
(28) |
Jun
(35) |
Jul
(37) |
Aug
(33) |
Sep
(60) |
Oct
(20) |
Nov
(35) |
Dec
(23) |
| 2012 |
Jan
(34) |
Feb
(23) |
Mar
(34) |
Apr
(21) |
May
(48) |
Jun
(24) |
Jul
(31) |
Aug
(39) |
Sep
(25) |
Oct
(10) |
Nov
(27) |
Dec
(28) |
| 2013 |
Jan
(32) |
Feb
(24) |
Mar
(24) |
Apr
(9) |
May
(4) |
Jun
(6) |
Jul
(2) |
Aug
(5) |
Sep
|
Oct
(5) |
Nov
(1) |
Dec
(12) |
| 2014 |
Jan
(14) |
Feb
(16) |
Mar
(5) |
Apr
(3) |
May
(2) |
Jun
(8) |
Jul
(2) |
Aug
|
Sep
(6) |
Oct
|
Nov
(6) |
Dec
|
| 2015 |
Jan
(3) |
Feb
(15) |
Mar
(7) |
Apr
|
May
|
Jun
(1) |
Jul
|
Aug
|
Sep
(2) |
Oct
|
Nov
|
Dec
(1) |
| 2016 |
Jan
|
Feb
(6) |
Mar
(2) |
Apr
|
May
|
Jun
|
Jul
|
Aug
|
Sep
|
Oct
|
Nov
|
Dec
|
| 2017 |
Jan
|
Feb
|
Mar
|
Apr
|
May
|
Jun
(1) |
Jul
|
Aug
|
Sep
|
Oct
|
Nov
|
Dec
|
| 2018 |
Jan
(1) |
Feb
|
Mar
|
Apr
|
May
|
Jun
|
Jul
|
Aug
|
Sep
|
Oct
|
Nov
(1) |
Dec
|
| 2019 |
Jan
|
Feb
|
Mar
|
Apr
(1) |
May
|
Jun
|
Jul
|
Aug
|
Sep
|
Oct
|
Nov
|
Dec
|
|
From: Niall G. <gal...@ya...> - 2008-09-28 18:42:29
|
Hi,
Try the following:
package org.simpleframework.xml.load;
import java.util.HashMap;
import java.util.Map;
import junit.framework.TestCase;
import org.simpleframework.xml.Attribute;
import org.simpleframework.xml.ElementMap;
import org.simpleframework.xml.Root;
import org.simpleframework.xml.Serializer;
public class MixTest extends TestCase {
@Root
private static class MixList {
@ElementMap(keyType=String.class, valueType=Object.class)
private Map<String, Object> map = new HashMap<String, Object>();
}
@Root
private class Entry {
@Attribute
private String name;
}
public void testMix() throws Exception {
MixList list = new MixList();
Serializer serializer = new Persister();
list.map.put("a", "b");
list.map.put("b", 1);
list.map.put("c", true);
serializer.write(list, System.out);
Entry entry = new Entry();
entry.name = "entry";
list.map.put("d", entry);
serializer.write(list, System.out);
}
}
Shared types in a map. It produces.
<mixList>
<map class="java.util.HashMap">
<entry>
<string>d</string>
<object class="org.simpleframework.xml.load.MixTest$Entry" name="entry"/>
</entry>
<entry>
<string>a</string>
<object class="java.lang.String"/>
</entry>
<entry>
<string>c</string>
<object class="java.lang.Boolean"/>
</entry>
<entry>
<string>b</string>
<object class="java.lang.Integer"/>
</entry>
</map>
</mixList>
Hope this helps
Niall
--- On Thu, 9/25/08, Stanislaw Osinski <sta...@ca...> wrote:
> From: Stanislaw Osinski <sta...@ca...>
> Subject: [Simple-support] Serializing collections with both SimpleXML-annotated and not annotated types
> To: sim...@li...
> Date: Thursday, September 25, 2008, 3:51 PM
> Hi there,
>
> First of all, thanks for sharing SimpleXML with the world,
> it makes working
> with XMLs a breeze!
>
> One usage scenario in my code is this: I have a map of
> objects (Map<String,
> Object>) that can contain instances of a number of JDK
> types (String,
> Integer, Double, Boolean etc.) but also some
> SimpleXML-annotated types. The
> problem obviously is that while the annotated types
> serialize / deserialize
> nicely, the JDK ones will not (unless the collection has
> the JDK type in its
> declaration, which is not possible in my case).
>
> I was wondering what was the recommended way of serializing
> / deserializing
> such collections. One approach that crossed my mind is
> replacing the JDK
> types with some sort of XML-annotated wrappers before
> serialization and
> reverting the mapping after deserialization, but maybe
> there is a better
> way? (after all, SimpleXML has mechanisms for serialization
> of e.g. a
> List<Integer>, so why not reuse them if possible?)
>
> Thanks,
>
> Staszek
>
> --
> http://www.carrot2.org
> -------------------------------------------------------------------------
> This SF.Net email is sponsored by the Moblin Your Move
> Developer's challenge
> Build the coolest Linux based applications with Moblin SDK
> & win great prizes
> Grand prize is a trip for two to an Open Source event
> anywhere in the world
> http://moblin-contest.org/redirect.php?banner_id=100&url=/_______________________________________________
> Simple-support mailing list
> Sim...@li...
> https://lists.sourceforge.net/lists/listinfo/simple-support
|
|
From: Stanislaw O. <sta...@ca...> - 2008-09-25 22:51:45
|
Hi there, First of all, thanks for sharing SimpleXML with the world, it makes working with XMLs a breeze! One usage scenario in my code is this: I have a map of objects (Map<String, Object>) that can contain instances of a number of JDK types (String, Integer, Double, Boolean etc.) but also some SimpleXML-annotated types. The problem obviously is that while the annotated types serialize / deserialize nicely, the JDK ones will not (unless the collection has the JDK type in its declaration, which is not possible in my case). I was wondering what was the recommended way of serializing / deserializing such collections. One approach that crossed my mind is replacing the JDK types with some sort of XML-annotated wrappers before serialization and reverting the mapping after deserialization, but maybe there is a better way? (after all, SimpleXML has mechanisms for serialization of e.g. a List<Integer>, so why not reuse them if possible?) Thanks, Staszek -- http://www.carrot2.org |
|
From: Niall G. <gal...@ya...> - 2008-09-24 21:12:51
|
Hi, Ill make sure to upload it shortly. Regards, Niall --- On Wed, 9/24/08, Joselito D. Moreno <joe...@gm...> wrote: > From: Joselito D. Moreno <joe...@gm...> > Subject: [Simple-support] Update on 1.7.2 Maven Central Repository Release > To: sim...@li... > Date: Wednesday, September 24, 2008, 1:33 PM > Hello, > > I found this thread in the mailing list archive > http://sourceforge.net/mailarchive/forum.php?thr...@we...&forum_name=simple-support. > > As of today, September 24, 2008, maven central repository > still does > not have 1.7.2. Is it deployed to some other maven > repository? > > Thank you very much. > > Joen Moreno > > ------------------------------------------------------------------------- > This SF.Net email is sponsored by the Moblin Your Move > Developer's challenge > Build the coolest Linux based applications with Moblin SDK > & win great prizes > Grand prize is a trip for two to an Open Source event > anywhere in the world > http://moblin-contest.org/redirect.php?banner_id=100&url=/ > _______________________________________________ > Simple-support mailing list > Sim...@li... > https://lists.sourceforge.net/lists/listinfo/simple-support |
|
From: Joselito D. M. <joe...@gm...> - 2008-09-24 20:34:28
|
Hello, I found this thread in the mailing list archive http://sourceforge.net/mailarchive/forum.php?thr...@we...&forum_name=simple-support. As of today, September 24, 2008, maven central repository still does not have 1.7.2. Is it deployed to some other maven repository? Thank you very much. Joen Moreno |
|
From: Niall G. <gal...@ya...> - 2008-09-21 19:18:57
|
Hi, Yes, this is an illegal name. Currently the serialization process does not validate the names of attributes or elements. Likely a rare issue, but in any case something I can and will add to the schema generation phase of serialization. Thanks for the feedback, Niall --- On Sun, 9/21/08, mic...@is... <mic...@is...> wrote: > From: mic...@is... <mic...@is...> > Subject: [Simple-support] invalid attribute name > To: sim...@li... > Date: Sunday, September 21, 2008, 9:57 AM > Hello, > I have following issue: > > i.e.: > @Attribute(name = "A+B") > int a_plus_b = 0; > > Simple generates a document on serialization however it is > not able to > deserialize it. > IMO '+' in attribute name violates XML > specification. > > Shouldn't be attributes names restricted somehow > (during writing to XML > ?) in order to ensure that Simple doesn't generate > invalid attribute > names and therefore incorrect xml document ? > > Thanks > Michal > > > ------------------------------------------------------------------------- > This SF.Net email is sponsored by the Moblin Your Move > Developer's challenge > Build the coolest Linux based applications with Moblin SDK > & win great prizes > Grand prize is a trip for two to an Open Source event > anywhere in the world > http://moblin-contest.org/redirect.php?banner_id=100&url=/ > _______________________________________________ > Simple-support mailing list > Sim...@li... > https://lists.sourceforge.net/lists/listinfo/simple-support |
|
From: <mic...@is...> - 2008-09-21 17:21:50
|
Hello,
I have following issue:
i.e.:
@Attribute(name = "A+B")
int a_plus_b = 0;
Simple generates a document on serialization however it is not able to
deserialize it.
IMO '+' in attribute name violates XML specification.
Shouldn't be attributes names restricted somehow (during writing to XML
?) in order to ensure that Simple doesn't generate invalid attribute
names and therefore incorrect xml document ?
Thanks
Michal
|
|
From: <Nia...@ub...> - 2008-09-09 10:58:59
|
Hi,
Sorry, thought I had responded. Just do this.
Object o = persister.read(Object.class, inputSource);
Every object subclasses the object class, so the type in the XML will
match. It does not need to ignore.
Hope this helps,
Niall
-----Original Message-----
From: sim...@li...
[mailto:sim...@li...] On Behalf Of Tony
Thompson
Sent: 09 September 2008 11:52
To: gal...@ya...; sim...@li...
Subject: Re: [Simple-support] How to deserialize from a stream
Any input on this issue?
So, if I create the Strategy to write, how do I read the objects back,
persister.read( ????, input )? If the class= attribute is in the XML,
does the read() method ignore the type parameter? I am still confused
about that part, sorry.
Thanks for the detailed response.
Tony
-----Original Message-----
From: Niall Gallagher [mailto:gal...@ya...]
Sent: Thursday, September 04, 2008 3:31 AM
To: sim...@li...; Tony Thompson
Subject: Re: [Simple-support] How to deserialize from a stream
Hi,
Yes you can, with a strategy. Currently I do not support top level
class="some.class.Name" attributes. The reason is because class=
attributes are only written when the expected type is a subclass of the
type. I should really add a method such as.
Persister.write(Object value, Class expect, OutputStream out);
Then you could write.
persister.write(value, Object.class, out);
Resulting in a class= attribute at the top leven. However, you can still
do this if you like. Create a strategy like so.
public class MyStrategy implements Strategy {
private final Strategy strategy;
public MyStrategy(Strategy strategy){
this.strategy = strategy;
}
public boolean setRoot(Class field, Object value, NodeMap node, Map
map){
return strategy.setRoot(Object.class, value, node, map);
}
}
And create it like so:
Strategy main = new DefaultStrategy();
Strategy mine = new MyStrategy(main);
Persister persister = new Persister(mine);
Then you will see top leven class= attributes. Note though you will have
to make org.simpleframework.xml.load.DefaultStrategy public. It is
currently package protected. I will make it public in the next release
as it really is needed to do most non-standard things with simple. Hope
this works, if it does not let me know.
A good starting point for learning what the Strategy is, is the javadoc,
tutorial, and the unit tests which come with the download.
Regards,
Niall
--- On Wed, 9/3/08, Tony Thompson <Ton...@st...> wrote:
> From: Tony Thompson <Ton...@st...>
> Subject: [Simple-support] How to deserialize from a stream
> To: sim...@li...
> Date: Wednesday, September 3, 2008, 10:35 AM I was able to serialize
> several objects to an output stream but now I would like to stream
> them back. There are too many objects to load them all into memory at
> once. It looks the Persister.read() method will work but, I have to
> pass in the object type that I am reading.
> I don't know
> what the type of the next object is because I have several different
> object types written to the XML file. Is there a way to stream each
> object back (one object in memory at a time) without knowing the
> object type ahead of time?
>
> I was able to serialize/deserialize all of my objects when I put them
> in a wrapper object and used @ElementList but, that requires they are
> all in memory at the same time so it really doesn't help me. Any
> other input would be helpful.
>
> Thanks.
> Tony
>
> This message (and any associated files) is intended only for the use
> of the individual or entity to which it is addressed and may contain
> information that is confidential, subject to copyright or constitutes
> a trade secret. If you are not the intended recipient you are hereby
> notified that any dissemination, copying or distribution of this
> message, or files associated with this message, is strictly
> prohibited. If you have received this message in error, please notify
> us immediately by replying to the message and deleting it from your
> computer. Messages sent to and from Stoneware, Inc.
> may be monitored.
> ----------------------------------------------------------------------
> --- This SF.Net email is sponsored by the Moblin Your Move Developer's
> challenge Build the coolest Linux based applications with Moblin SDK &
> win great prizes Grand prize is a trip for two to an Open Source event
> anywhere in the world
> http://moblin-contest.org/redirect.php?banner_id=100&url=/____________
> ___________________________________
> Simple-support mailing list
> Sim...@li...
> https://lists.sourceforge.net/lists/listinfo/simple-support
------------------------------------------------------------------------
-
This SF.Net email is sponsored by the Moblin Your Move Developer's
challenge
Build the coolest Linux based applications with Moblin SDK & win great
prizes
Grand prize is a trip for two to an Open Source event anywhere in the
world
http://moblin-contest.org/redirect.php?banner_id=100&url=/
_______________________________________________
Simple-support mailing list
Sim...@li...
https://lists.sourceforge.net/lists/listinfo/simple-support
Visit our website at http://www.ubs.com
This message contains confidential information and is intended only
for the individual named. If you are not the named addressee you
should not disseminate, distribute or copy this e-mail. Please
notify the sender immediately by e-mail if you have received this
e-mail by mistake and delete this e-mail from your system.
E-mails are not encrypted and cannot be guaranteed to be secure or
error-free as information could be intercepted, corrupted, lost,
destroyed, arrive late or incomplete, or contain viruses. The sender
therefore does not accept liability for any errors or omissions in the
contents of this message which arise as a result of e-mail transmission.
If verification is required please request a hard-copy version. This
message is provided for informational purposes and should not be
construed as a solicitation or offer to buy or sell any securities
or related financial instruments.
UBS Limited is a company registered in England & Wales under company
number 2035362, whose registered office is at 1 Finsbury Avenue,
London, EC2M 2PP, United Kingdom.
UBS AG (London Branch) is registered as a branch of a foreign company
under number BR004507, whose registered office is at
1 Finsbury Avenue, London, EC2M 2PP, United Kingdom.
UBS Clearing and Execution Services Limited is a company registered
in England & Wales under company number 03123037, whose registered
office is at 1 Finsbury Avenue, London, EC2M 2PP, United Kingdom.
|
|
From: Tony T. <Ton...@st...> - 2008-09-09 10:52:01
|
Any input on this issue?
So, if I create the Strategy to write, how do I read the objects back,
persister.read( ????, input )? If the class= attribute is in the XML,
does the read() method ignore the type parameter? I am still confused
about that part, sorry.
Thanks for the detailed response.
Tony
-----Original Message-----
From: Niall Gallagher [mailto:gal...@ya...]
Sent: Thursday, September 04, 2008 3:31 AM
To: sim...@li...; Tony Thompson
Subject: Re: [Simple-support] How to deserialize from a stream
Hi,
Yes you can, with a strategy. Currently I do not support top level
class="some.class.Name" attributes. The reason is because class=
attributes are only written when the expected type is a subclass of the
type. I should really add a method such as.
Persister.write(Object value, Class expect, OutputStream out);
Then you could write.
persister.write(value, Object.class, out);
Resulting in a class= attribute at the top leven. However, you can still
do this if you like. Create a strategy like so.
public class MyStrategy implements Strategy {
private final Strategy strategy;
public MyStrategy(Strategy strategy){
this.strategy = strategy;
}
public boolean setRoot(Class field, Object value, NodeMap node, Map
map){
return strategy.setRoot(Object.class, value, node, map);
}
}
And create it like so:
Strategy main = new DefaultStrategy();
Strategy mine = new MyStrategy(main);
Persister persister = new Persister(mine);
Then you will see top leven class= attributes. Note though you will have
to make org.simpleframework.xml.load.DefaultStrategy public. It is
currently package protected. I will make it public in the next release
as it really is needed to do most non-standard things with simple. Hope
this works, if it does not let me know.
A good starting point for learning what the Strategy is, is the javadoc,
tutorial, and the unit tests which come with the download.
Regards,
Niall
--- On Wed, 9/3/08, Tony Thompson <Ton...@st...> wrote:
> From: Tony Thompson <Ton...@st...>
> Subject: [Simple-support] How to deserialize from a stream
> To: sim...@li...
> Date: Wednesday, September 3, 2008, 10:35 AM I was able to serialize
> several objects to an output stream but now I would like to stream
> them back. There are too many objects to load them all into memory at
> once. It looks the Persister.read() method will work but, I have to
> pass in the object type that I am reading.
> I don't know
> what the type of the next object is because I have several different
> object types written to the XML file. Is there a way to stream each
> object back (one object in memory at a time) without knowing the
> object type ahead of time?
>
> I was able to serialize/deserialize all of my objects when I put them
> in a wrapper object and used @ElementList but, that requires they are
> all in memory at the same time so it really doesn't help me. Any
> other input would be helpful.
>
> Thanks.
> Tony
>
> This message (and any associated files) is intended only for the use
> of the individual or entity to which it is addressed and may contain
> information that is confidential, subject to copyright or constitutes
> a trade secret. If you are not the intended recipient you are hereby
> notified that any dissemination, copying or distribution of this
> message, or files associated with this message, is strictly
> prohibited. If you have received this message in error, please notify
> us immediately by replying to the message and deleting it from your
> computer. Messages sent to and from Stoneware, Inc.
> may be monitored.
> ----------------------------------------------------------------------
> --- This SF.Net email is sponsored by the Moblin Your Move Developer's
> challenge Build the coolest Linux based applications with Moblin SDK &
> win great prizes Grand prize is a trip for two to an Open Source event
> anywhere in the world
> http://moblin-contest.org/redirect.php?banner_id=100&url=/____________
> ___________________________________
> Simple-support mailing list
> Sim...@li...
> https://lists.sourceforge.net/lists/listinfo/simple-support
|
|
From: <Nia...@ub...> - 2008-09-09 06:57:44
|
Visit our website at http://www.ubs.com This message contains confidential information and is intended only for the individual named. If you are not the named addressee you should not disseminate, distribute or copy this e-mail. Please notify the sender immediately by e-mail if you have received this e-mail by mistake and delete this e-mail from your system. E-mails are not encrypted and cannot be guaranteed to be secure or error-free as information could be intercepted, corrupted, lost, destroyed, arrive late or incomplete, or contain viruses. The sender therefore does not accept liability for any errors or omissions in the contents of this message which arise as a result of e-mail transmission. If verification is required please request a hard-copy version. This message is provided for informational purposes and should not be construed as a solicitation or offer to buy or sell any securities or related financial instruments. UBS Limited is a company registered in England & Wales under company number 2035362, whose registered office is at 1 Finsbury Avenue, London, EC2M 2PP, United Kingdom. UBS AG (London Branch) is registered as a branch of a foreign company under number BR004507, whose registered office is at 1 Finsbury Avenue, London, EC2M 2PP, United Kingdom. UBS Clearing and Execution Services Limited is a company registered in England & Wales under company number 03123037, whose registered office is at 1 Finsbury Avenue, London, EC2M 2PP, United Kingdom. |
|
From: Rob G. <rob...@qu...> - 2008-09-09 06:40:41
|
Hello,
The following code in a class that is to be serialized
@ElementMap(keyType=Class.class, valueType = Component.class)
Map<Class<? extends Component>, Component> components = new HashMap<Class<? extends Component>, Component>();
results in a NullPointerException in Simple 1.7.2
java.lang.NullPointerException
at org.simpleframework.xml.load.Signature.getEntry(Signature.java:102)
at org.simpleframework.xml.load.ElementMapLabel.getEntry(ElementMapLabel.java:136)
at org.simpleframework.xml.load.CacheLabel.<init>(CacheLabel.java:105)
at org.simpleframework.xml.load.LabelFactory.getInstance(LabelFactory.java:65)
at org.simpleframework.xml.load.Scanner.process(Scanner.java:558)
at org.simpleframework.xml.load.Scanner.scan(Scanner.java:514)
at org.simpleframework.xml.load.Scanner.field(Scanner.java:473)
at org.simpleframework.xml.load.Scanner.process(Scanner.java:457)
at org.simpleframework.xml.load.Scanner.scan(Scanner.java:344)
at org.simpleframework.xml.load.Scanner.<init>(Scanner.java:126)
at org.simpleframework.xml.load.ScannerFactory.getInstance(ScannerFactory.java:63)
at org.simpleframework.xml.load.Factory.getScanner(Factory.java:154)
at org.simpleframework.xml.load.Factory.getName(Factory.java:171)
at org.simpleframework.xml.load.Traverser.getName(Traverser.java:236)
at org.simpleframework.xml.load.Traverser.write(Traverser.java:178)
at org.simpleframework.xml.load.Traverser.write(Traverser.java:161)
at org.simpleframework.xml.load.Persister.write(Persister.java:769)
at org.simpleframework.xml.load.Persister.write(Persister.java:751)
at org.simpleframework.xml.load.Persister.write(Persister.java:732)
at org.simpleframework.xml.load.Persister.write(Persister.java:848)
If I change it to
@ElementMap(keyType=Class.class, valueType = Component.class)
Map<Class, Component> components = new HashMap<Class, Component>();
then it works. Looks like the generified Class trips Simple over.
Thanks,
Rob Griffin
Quest Software
Phone +613 98118021
www.quest.com<http://www.quest.com>
|
|
From: Niall G. <gal...@ya...> - 2008-09-07 15:10:28
|
Hi, This is not a bug. The "class" attribute is a reserved attribute. It specifies the name of the concrete class when polymorphism is required. You can use the CycleStrategy and rename the class attribute to something else like "type" if you like. In the next release I will be making this more configurable. Niall --- On Sat, 9/6/08, mic...@is... <mic...@is...> wrote: > From: mic...@is... <mic...@is...> > Subject: [Simple-support] deserialize with attribute name="class" > To: sim...@li... > Date: Saturday, September 6, 2008, 6:12 PM > Hi, > > I am trying to serialize/deserialize with Simple 1.7.2 > > when I use something like: > > @Attribute(name="class") > String name_of_class; > > then persisting into xml works. However when I try > to deserialize xml file then I get: > > Exception in thread "main" > java.lang.ClassNotFoundException: ... > > if I change to: > @Attribute(name="clazz") > String name_of_class; > > then it is possible to serialize/deserialize without any > problems > > It looks like a bug to me. > > Michal > > ------------------------------------------------------------------------- > This SF.Net email is sponsored by the Moblin Your Move > Developer's challenge > Build the coolest Linux based applications with Moblin SDK > & win great prizes > Grand prize is a trip for two to an Open Source event > anywhere in the world > http://moblin-contest.org/redirect.php?banner_id=100&url=/ > _______________________________________________ > Simple-support mailing list > Sim...@li... > https://lists.sourceforge.net/lists/listinfo/simple-support |
|
From: <mic...@is...> - 2008-09-07 01:13:08
|
Hi,
I am trying to serialize/deserialize with Simple 1.7.2
when I use something like:
@Attribute(name="class")
String name_of_class;
then persisting into xml works. However when I try
to deserialize xml file then I get:
Exception in thread "main" java.lang.ClassNotFoundException: ...
if I change to:
@Attribute(name="clazz")
String name_of_class;
then it is possible to serialize/deserialize without any problems
It looks like a bug to me.
Michal
|
|
From: Tony T. <Ton...@st...> - 2008-09-04 11:16:33
|
So, if I create the Strategy to write, how do I read the objects back,
persister.read( ????, input )? If the class= attribute is in the XML,
does the read() method ignore the type parameter? I am still confused
about that part, sorry.
Thanks for the detailed response.
Tony
-----Original Message-----
From: Niall Gallagher [mailto:gal...@ya...]
Sent: Thursday, September 04, 2008 3:31 AM
To: sim...@li...; Tony Thompson
Subject: Re: [Simple-support] How to deserialize from a stream
Hi,
Yes you can, with a strategy. Currently I do not support top level
class="some.class.Name" attributes. The reason is because class=
attributes are only written when the expected type is a subclass of the
type. I should really add a method such as.
Persister.write(Object value, Class expect, OutputStream out);
Then you could write.
persister.write(value, Object.class, out);
Resulting in a class= attribute at the top leven. However, you can still
do this if you like. Create a strategy like so.
public class MyStrategy implements Strategy {
private final Strategy strategy;
public MyStrategy(Strategy strategy){
this.strategy = strategy;
}
public boolean setRoot(Class field, Object value, NodeMap node, Map
map){
return strategy.setRoot(Object.class, value, node, map);
}
}
And create it like so:
Strategy main = new DefaultStrategy();
Strategy mine = new MyStrategy(main);
Persister persister = new Persister(mine);
Then you will see top leven class= attributes. Note though you will have
to make org.simpleframework.xml.load.DefaultStrategy public. It is
currently package protected. I will make it public in the next release
as it really is needed to do most non-standard things with simple. Hope
this works, if it does not let me know.
A good starting point for learning what the Strategy is, is the javadoc,
tutorial, and the unit tests which come with the download.
Regards,
Niall
--- On Wed, 9/3/08, Tony Thompson <Ton...@st...> wrote:
> From: Tony Thompson <Ton...@st...>
> Subject: [Simple-support] How to deserialize from a stream
> To: sim...@li...
> Date: Wednesday, September 3, 2008, 10:35 AM I was able to serialize
> several objects to an output stream but now I would like to stream
> them back. There are too many objects to load them all into memory at
> once. It looks the Persister.read() method will work but, I have to
> pass in the object type that I am reading.
> I don't know
> what the type of the next object is because I have several different
> object types written to the XML file. Is there a way to stream each
> object back (one object in memory at a time) without knowing the
> object type ahead of time?
>
> I was able to serialize/deserialize all of my objects when I put them
> in a wrapper object and used @ElementList but, that requires they are
> all in memory at the same time so it really doesn't help me. Any
> other input would be helpful.
>
> Thanks.
> Tony
>
> This message (and any associated files) is intended only for the use
> of the individual or entity to which it is addressed and may contain
> information that is confidential, subject to copyright or constitutes
> a trade secret. If you are not the intended recipient you are hereby
> notified that any dissemination, copying or distribution of this
> message, or files associated with this message, is strictly
> prohibited. If you have received this message in error, please notify
> us immediately by replying to the message and deleting it from your
> computer. Messages sent to and from Stoneware, Inc.
> may be monitored.
> ----------------------------------------------------------------------
> --- This SF.Net email is sponsored by the Moblin Your Move Developer's
> challenge Build the coolest Linux based applications with Moblin SDK &
> win great prizes Grand prize is a trip for two to an Open Source event
> anywhere in the world
> http://moblin-contest.org/redirect.php?banner_id=100&url=/____________
> ___________________________________
> Simple-support mailing list
> Sim...@li...
> https://lists.sourceforge.net/lists/listinfo/simple-support
|
|
From: Niall G. <gal...@ya...> - 2008-09-04 07:31:25
|
Hi,
Yes you can, with a strategy. Currently I do not support top level class="some.class.Name" attributes. The reason is because class= attributes are only written when the expected type is a subclass of the type. I should really add a method such as.
Persister.write(Object value, Class expect, OutputStream out);
Then you could write.
persister.write(value, Object.class, out);
Resulting in a class= attribute at the top leven. However, you can still do this if you like. Create a strategy like so.
public class MyStrategy implements Strategy {
private final Strategy strategy;
public MyStrategy(Strategy strategy){
this.strategy = strategy;
}
public boolean setRoot(Class field, Object value, NodeMap node, Map map){
return strategy.setRoot(Object.class, value, node, map);
}
}
And create it like so:
Strategy main = new DefaultStrategy();
Strategy mine = new MyStrategy(main);
Persister persister = new Persister(mine);
Then you will see top leven class= attributes. Note though you will have to make org.simpleframework.xml.load.DefaultStrategy public. It is currently package protected. I will make it public in the next release as it really is needed to do most non-standard things with simple. Hope this works, if it does not let me know.
A good starting point for learning what the Strategy is, is the javadoc, tutorial, and the unit tests which come with the download.
Regards,
Niall
--- On Wed, 9/3/08, Tony Thompson <Ton...@st...> wrote:
> From: Tony Thompson <Ton...@st...>
> Subject: [Simple-support] How to deserialize from a stream
> To: sim...@li...
> Date: Wednesday, September 3, 2008, 10:35 AM
> I was able to serialize several objects to an output stream
> but now I
> would like to stream them back. There are too many objects
> to load them
> all into memory at once. It looks the Persister.read()
> method will work
> but, I have to pass in the object type that I am reading.
> I don't know
> what the type of the next object is because I have several
> different
> object types written to the XML file. Is there a way to
> stream each
> object back (one object in memory at a time) without
> knowing the object
> type ahead of time?
>
> I was able to serialize/deserialize all of my objects when
> I put them in
> a wrapper object and used @ElementList but, that requires
> they are all
> in memory at the same time so it really doesn't help
> me. Any other
> input would be helpful.
>
> Thanks.
> Tony
>
> This message (and any associated files) is intended only
> for the
> use of the individual or entity to which it is addressed
> and may
> contain information that is confidential, subject to
> copyright or
> constitutes a trade secret. If you are not the intended
> recipient
> you are hereby notified that any dissemination, copying or
> distribution of this message, or files associated with this
> message,
> is strictly prohibited. If you have received this message
> in error,
> please notify us immediately by replying to the message and
> deleting
> it from your computer. Messages sent to and from Stoneware,
> Inc.
> may be monitored.
> -------------------------------------------------------------------------
> This SF.Net email is sponsored by the Moblin Your Move
> Developer's challenge
> Build the coolest Linux based applications with Moblin SDK
> & win great prizes
> Grand prize is a trip for two to an Open Source event
> anywhere in the world
> http://moblin-contest.org/redirect.php?banner_id=100&url=/_______________________________________________
> Simple-support mailing list
> Sim...@li...
> https://lists.sourceforge.net/lists/listinfo/simple-support
|
|
From: Tony T. <Ton...@st...> - 2008-09-03 17:35:13
|
I was able to serialize several objects to an output stream but now I would like to stream them back. There are too many objects to load them all into memory at once. It looks the Persister.read() method will work but, I have to pass in the object type that I am reading. I don't know what the type of the next object is because I have several different object types written to the XML file. Is there a way to stream each object back (one object in memory at a time) without knowing the object type ahead of time? I was able to serialize/deserialize all of my objects when I put them in a wrapper object and used @ElementList but, that requires they are all in memory at the same time so it really doesn't help me. Any other input would be helpful. Thanks. Tony This message (and any associated files) is intended only for the use of the individual or entity to which it is addressed and may contain information that is confidential, subject to copyright or constitutes a trade secret. If you are not the intended recipient you are hereby notified that any dissemination, copying or distribution of this message, or files associated with this message, is strictly prohibited. If you have received this message in error, please notify us immediately by replying to the message and deleting it from your computer. Messages sent to and from Stoneware, Inc. may be monitored. |
|
From: Niall G. <gal...@ya...> - 2008-09-03 05:34:33
|
Hi, There is an example of how to use a strategy in the tutorial. In you dont need to deserialize the XML after serializing it again, then you can simple remove the inserted class attribute from the NodeMap. Also, just to mention, the class="java.util.ArrayList" is added to the XML only because your field is not that concrete type. e.g @ElementList private List list; If it were @ElementList private ArrayList list It would not generate the class= attribute. Finally a good source of information on how to use Strategy objects can be found by simply looking at the unit tests for the strategy. These come with the download and are int the test/src folder. Hope this helps, Niall --- On Tue, 9/2/08, John Fairhall <joh...@qu...> wrote: > From: John Fairhall <joh...@qu...> > Subject: [Simple-support] removing class attribute from ElementLists > To: "sim...@li..." <sim...@li...> > Date: Tuesday, September 2, 2008, 6:57 PM > Hi, > > I am relatively new to Simple. I'm trying to produce > XML that can be used outside of Java. I would like to remove > the 'class' attributes from various ElementLists > which are java ArrayLists of a concrete type. From looking > through the archive it looks like I can use a Strategy to do > this. Is there any example documentation on how to create a > Strategy? > > John. > > ------------------------------------------------------------------------- > This SF.Net email is sponsored by the Moblin Your Move > Developer's challenge > Build the coolest Linux based applications with Moblin SDK > & win great prizes > Grand prize is a trip for two to an Open Source event > anywhere in the world > http://moblin-contest.org/redirect.php?banner_id=100&url=/_______________________________________________ > Simple-support mailing list > Sim...@li... > https://lists.sourceforge.net/lists/listinfo/simple-support |
|
From: John F. <joh...@qu...> - 2008-09-03 01:57:39
|
Hi, I am relatively new to Simple. I'm trying to produce XML that can be used outside of Java. I would like to remove the 'class' attributes from various ElementLists which are java ArrayLists of a concrete type. From looking through the archive it looks like I can use a Strategy to do this. Is there any example documentation on how to create a Strategy? John. |
|
From: Niall G. <gal...@ya...> - 2008-08-23 07:42:03
|
Hi,
The inner class needs to be static. Otherwise it can not be instantiated reflectively.
Niall
--- On Fri, 8/22/08, Alan Deikman <Ala...@zn...> wrote:
> From: Alan Deikman <Ala...@zn...>
> Subject: [Simple-support] Problem deserializing an inner class
> To: sim...@li...
> Date: Friday, August 22, 2008, 5:15 PM
> I got stuck on this. I'm using inner classes and a
> CycleStrategy, and
> the serialization seems to work fine. However on
> de-serialization I get
> an exception thrown:
>
> > java.lang.NoSuchMethodException:
> com.test.Outer$Inner.<init>()
> > at
> java.lang.Class.getConstructor0(Class.java:2706)
> > at
> java.lang.Class.getDeclaredConstructor(Class.java:1985)
> > at
> >
> org.simpleframework.xml.graph.Instance.getInstance(Instance.java:75)
> > at
> >
> org.simpleframework.xml.graph.Instance.getInstance(Instance.java:62)
> (etc)
>
> This is from the template:
>
> @Root public class Outer {
> ....
> @Element private String whatever;
>
> public class Inner {
> @Element private String whenever;
> }
>
> @ElementList protected ArrayList<Inner> innards;
>
> }
>
> It doesn't make any difference whether I put a
> constructor on the inner
> class or not. However the XML output looks as logical as
> a
> checkerboard. Any ideas what is going wrong?
>
> Regards,
>
> --
> Alan
>
>
> -------------------------------------------------------------------------
> This SF.Net email is sponsored by the Moblin Your Move
> Developer's challenge
> Build the coolest Linux based applications with Moblin SDK
> & win great prizes
> Grand prize is a trip for two to an Open Source event
> anywhere in the world
> http://moblin-contest.org/redirect.php?banner_id=100&url=/
> _______________________________________________
> Simple-support mailing list
> Sim...@li...
> https://lists.sourceforge.net/lists/listinfo/simple-support
|
|
From: Alan D. <Ala...@zn...> - 2008-08-23 00:15:21
|
I got stuck on this. I'm using inner classes and a CycleStrategy, and
the serialization seems to work fine. However on de-serialization I get
an exception thrown:
> java.lang.NoSuchMethodException: com.test.Outer$Inner.<init>()
> at java.lang.Class.getConstructor0(Class.java:2706)
> at java.lang.Class.getDeclaredConstructor(Class.java:1985)
> at
> org.simpleframework.xml.graph.Instance.getInstance(Instance.java:75)
> at
> org.simpleframework.xml.graph.Instance.getInstance(Instance.java:62)
(etc)
This is from the template:
@Root public class Outer {
....
@Element private String whatever;
public class Inner {
@Element private String whenever;
}
@ElementList protected ArrayList<Inner> innards;
}
It doesn't make any difference whether I put a constructor on the inner
class or not. However the XML output looks as logical as a
checkerboard. Any ideas what is going wrong?
Regards,
--
Alan
|
|
From: Timo R. <cr...@ol...> - 2008-08-21 10:26:01
|
Hello, >> 2. Why are @Commit and @Persist and @Complete implemented as >> annotations rather than defining a java interface? just adding to what Niall already wrote: think about the developement of JavaEE's EJB 2 specification to EJB version 3 - there were exactly the same intentions to discard all those bean interfaces and switch to annotations instead: It is not a good practice to bring in a framework dependency into your domain models (think about changing the persistance provider implementation). Niall's decision to use annotaions is the best way, in my opinion. Best regards, Timo |
|
From: <Nia...@ub...> - 2008-08-21 08:26:39
|
Hi, I have added my answers under the associated questions. > My compliments -- this is an amazingly well-done and professional > software package. I am considering using it for all my > new code. Great, glad you found it so useful. > I did have a couple of questions which I haven't been able to answer > by reading the archives. > > 1. Have there been any comparisons done between simple and Sun's > XMLEncoder? That's what I was looking at when I came > across simple. > Are there things that XMLEncoder can do that simple can't, and are any > of those things on the roadmap? No, there should be nothing possible with XMLEncoder that simple can not handle. Also simple can handle much more than XMLEncoder can in terms of formatting and flexibility. > 2. Why are @Commit and @Persist and @Complete implemented as > annotations rather than defining a java interface? Because I did not want to intrude in to the developers object model. Consider an existing POJO,you do not always want a public commit method exposed, nor do you always want to add an interface. With annotations you can annotate a private, perhaps existing, method. It will not affect your object model and the user does not even know about it. Just transparent serialization the whole way. > 3. What is the preferred method for selective serialization? What I > want to do is include some elements based on a runtime boolean > expression rather than always serialize them. There are many, there is read resolve and write replace capabilities as you would see in Java Object Serialization. Also the @Persist and @Complete persister callbacks allow you to modify your object prior to serialization and recover it after. Finally the Strategy object is the central point of interception and manipulation in the framework. It will allow you to do just about anything. > 4. Is there any roadmap to providing a hook so you can control the > formatting of the XML output? (Some of my planned applications might > have users looking at the XML files in an editor, and simple doesn't > seem to limit line length.) Also, it might be nice to be > able to > generate comment blocks in the output. Well you have the Format object, this will control indentation. However I have not included line wrapping, which I guess I could include in future. Line wrapping could be done in a custom Writer that just inserts new line characters if its tool long. As for comments, this is something that needs to be added to the OutputNode object, so that you can write comments to a given node. Hope this helps Niall Visit our website at http://www.ubs.com This message contains confidential information and is intended only for the individual named. If you are not the named addressee you should not disseminate, distribute or copy this e-mail. Please notify the sender immediately by e-mail if you have received this e-mail by mistake and delete this e-mail from your system. E-mails are not encrypted and cannot be guaranteed to be secure or error-free as information could be intercepted, corrupted, lost, destroyed, arrive late or incomplete, or contain viruses. The sender therefore does not accept liability for any errors or omissions in the contents of this message which arise as a result of e-mail transmission. If verification is required please request a hard-copy version. This message is provided for informational purposes and should not be construed as a solicitation or offer to buy or sell any securities or related financial instruments. UBS Limited is a company registered in England & Wales under company number 2035362, whose registered office is at 1 Finsbury Avenue, London, EC2M 2PP, United Kingdom. UBS AG (London Branch) is registered as a branch of a foreign company under number BR004507, whose registered office is at 1 Finsbury Avenue, London, EC2M 2PP, United Kingdom. UBS Clearing and Execution Services Limited is a company registered in England & Wales under company number 03123037, whose registered office is at 1 Finsbury Avenue, London, EC2M 2PP, United Kingdom. |
|
From: Alan D. <Ala...@zn...> - 2008-08-21 02:40:32
|
Hi. Prior to recently hitting simple on a google search I had been doing all my XML processing with JDOM. I was amazed at how easy the simple framework was to use for serializing objects in my new application -- I had my first successful run of it within an hour of downloading the code! (Most of that was reading the tutorial.) My compliments -- this is an amazingly well-done and professional software package. I am considering using it for all my new code. I did have a couple of questions which I haven't been able to answer by reading the archives. 1. Have there been any comparisons done between simple and Sun's XMLEncoder? That's what I was looking at when I came across simple. Are there things that XMLEncoder can do that simple can't, and are any of those things on the roadmap? 2. Why are @Commit and @Persist and @Complete implemented as annotations rather than defining a java interface? 3. What is the preferred method for selective serialization? What I want to do is include some elements based on a runtime boolean expression rather than always serialize them. 4. Is there any roadmap to providing a hook so you can control the formatting of the XML output? (Some of my planned applications might have users looking at the XML files in an editor, and simple doesn't seem to limit line length.) Also, it might be nice to be able to generate comment blocks in the output. Thanks in advance for any assistance -- Alan |
|
From: Niall G. <gal...@ya...> - 2008-07-31 11:48:35
|
Hi,
Well its easy to implement, so it would not take too much time once I have decided on exactly how to do it. I would imagine it would be the end of August before it will be done and released.
Niall
--- On Thu, 7/31/08, Patrick Sturm <si...@ge...> wrote:
> From: Patrick Sturm <si...@ge...>
> Subject: Re: [Simple-support] Namespace support
> To: sim...@li...
> Date: Thursday, July 31, 2008, 3:58 AM
> Hey Niall,
> It would be really helpful if you could tell me when
> namespace support
> will be implemented (approx.). We are currently working
> (planning) on an
> opensource project that heavily relies on XML. I am in
> favor of simple,
> because it does exactly what we need, but without an
> approximate date
> it is going to be hard to convince the others to wait.
> Please don't feel
> obligated or forced to rush development, if you can provide
> an answer
> that would be great, if you can't we'll have to
> live with it :>
>
> best regards siyb
>
> Niall Gallagher wrote:
> > Hi,
> >
> > I would like to add namespace support, unfortunately
> setting the name="foo:bar" will not work for
> deserialization. As the element or attribute name is
> "bar" and so it will not match. I was thinking of
> adding a namespace attribute to the annotations. For
> instance something like:
> >
> >
> > @Root(name="name",
> namespace="http://location/path")
> > public class Type {
> >
> > @Element(name="blah",
> namespace="http://domain/path")
> > private String value;
> > }
> >
> > And and a org.simpleframework.xml.stream.Namespace
> object to the org.simpleframework.xml.stream.Node object.
> This would then allow you to add custom prefixes or at the
> very least manipluate the namespaces if needed during
> serialization. Really not a big fix, and something I have
> planned for a while but have not really come up with an
> ideal solution yet.
> >
> > Niall
> >
> > --- On Wed, 7/30/08, Patrick Sturm
> <si...@ge...> wrote:
> >
> >
> >> From: Patrick Sturm <si...@ge...>
> >> Subject: [Simple-support] Namespace support
> >> To: sim...@li...
> >> Date: Wednesday, July 30, 2008, 5:24 AM
> >> I was not able to find documents that cover the
> topic of
> >> namespaces in
> >> simple. How would one implement namespaces such as
> foo:bar.
> >> I did come
> >> up with one idea, that involves
> >> @Element(name="foo:bar"),
> >> @Root(name="foo:bar") and
> @Attribute(name...) but
> >> I suppose that there
> >> might be a better way.
> >>
> >> regards siyb
> >>
> >>
> >>
> -------------------------------------------------------------------------
> >> This SF.Net email is sponsored by the Moblin Your
> Move
> >> Developer's challenge
> >> Build the coolest Linux based applications with
> Moblin SDK
> >> & win great prizes
> >> Grand prize is a trip for two to an Open Source
> event
> >> anywhere in the world
> >>
> http://moblin-contest.org/redirect.php?banner_id=100&url=/
> >> _______________________________________________
> >> Simple-support mailing list
> >> Sim...@li...
> >>
> https://lists.sourceforge.net/lists/listinfo/simple-support
> >>
> >
> >
> >
> >
>
>
> -------------------------------------------------------------------------
> This SF.Net email is sponsored by the Moblin Your Move
> Developer's challenge
> Build the coolest Linux based applications with Moblin SDK
> & win great prizes
> Grand prize is a trip for two to an Open Source event
> anywhere in the world
> http://moblin-contest.org/redirect.php?banner_id=100&url=/
> _______________________________________________
> Simple-support mailing list
> Sim...@li...
> https://lists.sourceforge.net/lists/listinfo/simple-support
|
|
From: Andrey M. B. <an...@ya...> - 2008-07-31 11:19:30
|
Thank you, Nail. ----- Mensagem original ---- De: Niall Gallagher <gal...@ya...> Para: sim...@li...; Andrey Morais Brüggemann <an...@ya...> Enviadas: Quarta-feira, 30 de Julho de 2008 8:52:47 Assunto: Re: [Simple-support] Simple 1.7.2 not in Maven Repository Hi, Yes, I am going to write a maven sync script so that the latest version always appears on maven. Hopefully I should be able to put the latest version up shortly. Regards, Niall --- On Mon, 7/28/08, Andrey Morais Brüggemann <an...@ya...> wrote: > From: Andrey Morais Brüggemann <an...@ya...> > Subject: [Simple-support] Simple 1.7.2 not in Maven Repository > To: sim...@li... > Date: Monday, July 28, 2008, 4:35 AM > Hi > > I'm using SimpleXml 1.7.2 on a project that uses Maven > for build, but the last version of SimpleXml on maven > repositories are 1.6.2. > Could you send 1.7.2 version to there, please? > > Thanks. > > Andrey. > > > > Novos endereços, o Yahoo! que você conhece. Crie um > email novo com a sua cara @ymail.com ou @rocketmail.com. > http://br.new.mail.yahoo.com/addresses > > ------------------------------------------------------------------------- > This SF.Net email is sponsored by the Moblin Your Move > Developer's challenge > Build the coolest Linux based applications with Moblin SDK > & win great prizes > Grand prize is a trip for two to an Open Source event > anywhere in the world > http://moblin-contest.org/redirect.php?banner_id=100&url=/ > _______________________________________________ > Simple-support mailing list > Sim...@li... > https://lists.sourceforge.net/lists/listinfo/simple-support ------------------------------------------------------------------------- This SF.Net email is sponsored by the Moblin Your Move Developer's challenge Build the coolest Linux based applications with Moblin SDK & win great prizes Grand prize is a trip for two to an Open Source event anywhere in the world http://moblin-contest.org/redirect.php?banner_id=100&url=/ _______________________________________________ Simple-support mailing list Sim...@li... https://lists.sourceforge.net/lists/listinfo/simple-support Novos endereços, o Yahoo! que você conhece. Crie um email novo com a sua cara @ymail.com ou @rocketmail.com. http://br.new.mail.yahoo.com/addresses |
|
From: Patrick S. <si...@ge...> - 2008-07-31 10:59:01
|
Hey Niall,
It would be really helpful if you could tell me when namespace support
will be implemented (approx.). We are currently working (planning) on an
opensource project that heavily relies on XML. I am in favor of simple,
because it does exactly what we need, but without an approximate date
it is going to be hard to convince the others to wait. Please don't feel
obligated or forced to rush development, if you can provide an answer
that would be great, if you can't we'll have to live with it :>
best regards siyb
Niall Gallagher wrote:
> Hi,
>
> I would like to add namespace support, unfortunately setting the name="foo:bar" will not work for deserialization. As the element or attribute name is "bar" and so it will not match. I was thinking of adding a namespace attribute to the annotations. For instance something like:
>
>
> @Root(name="name", namespace="http://location/path")
> public class Type {
>
> @Element(name="blah", namespace="http://domain/path")
> private String value;
> }
>
> And and a org.simpleframework.xml.stream.Namespace object to the org.simpleframework.xml.stream.Node object. This would then allow you to add custom prefixes or at the very least manipluate the namespaces if needed during serialization. Really not a big fix, and something I have planned for a while but have not really come up with an ideal solution yet.
>
> Niall
>
> --- On Wed, 7/30/08, Patrick Sturm <si...@ge...> wrote:
>
>
>> From: Patrick Sturm <si...@ge...>
>> Subject: [Simple-support] Namespace support
>> To: sim...@li...
>> Date: Wednesday, July 30, 2008, 5:24 AM
>> I was not able to find documents that cover the topic of
>> namespaces in
>> simple. How would one implement namespaces such as foo:bar.
>> I did come
>> up with one idea, that involves
>> @Element(name="foo:bar"),
>> @Root(name="foo:bar") and @Attribute(name...) but
>> I suppose that there
>> might be a better way.
>>
>> regards siyb
>>
>>
>> -------------------------------------------------------------------------
>> This SF.Net email is sponsored by the Moblin Your Move
>> Developer's challenge
>> Build the coolest Linux based applications with Moblin SDK
>> & win great prizes
>> Grand prize is a trip for two to an Open Source event
>> anywhere in the world
>> http://moblin-contest.org/redirect.php?banner_id=100&url=/
>> _______________________________________________
>> Simple-support mailing list
>> Sim...@li...
>> https://lists.sourceforge.net/lists/listinfo/simple-support
>>
>
>
>
>
|