simple-support Mailing List for Simple (Page 28)
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: Dennis B. <bij...@gm...> - 2011-09-11 13:09:27
|
Dear all,
I've written a SED script to convert java source files gerated with xjc
(from XML schema workig with JAXB) to simpleframework-compatible source code.
It depends a bit on the way xjc generates the software, so it may not
work directly on hand-written jaxb source code.
The script works as follows (tested on Ubuntu Linux):
- generate source with xjc: xjc XMLSchema.xsd
- jaxb2simple.sed generated/JAXBSource.java > src/generated/SimpleSource.java
- or in batch with the rewrite script:
NAMESPACE=generated
cd $NAMESPACE
for i in *.java ;do ../../rewrite.sh $i ../$NAMESPACE/ddi/$i ;done
The generated code can now be used on android with simple. Some things may
need to be fixed, since I didn't test yet with an XSD covering all concepts,
and because simpleframework defaults to require all elements (opposed to
jaxb). Expect fixes for emply lists, and enumerations of strings (Android
does not seem to return valueOf correctly when casing of remaining
letters does not match enum name).
Kind regards,
Dennis Bijwaard
|
|
From: TE <al...@ho...> - 2011-09-09 18:28:00
|
Unfortunately Android does not allow external jars to implement most of the namespaces under java.* and javax.*. See http://code.google.com/p/android/issues/detail?id=13084 for details. JAXB annotations (being under java.xml) is one of them. I was hoping that it would somehow be possible to handle these in the Simple code (i.e. catch the exception and treat as if those annotations did not exist). TE _____ From: Niall Gallagher [mailto:gal...@ya...] Sent: 02 Eylül 2011 Cuma 11:07 To: sim...@li... Subject: Re: [Simple-support] Ignoring unavailable annotations (JAXB onAndroid devices) I am afraid not, Android just does not have these annotations. You could perhaps try add them to a jar and include them? But this is not something I have tried. From: TE <al...@ho...> Subject: [Simple-support] Ignoring unavailable annotations (JAXB on Android devices) To: sim...@li... Received: Thursday, 1 September, 2011, 1:13 PM Hello, >From my research, it seems that Simple is the best XML serialization/deserialization framework available for Android. The API and the framework "feels right". Thank you very much for your efforts, esp. on getting it to work on Android. :-) I have started experimenting with Simple features and one issue that I need help with is related to classes annotated both with JAXB and Simple (server side is a servlet implemented using JAX-RS via RestEasy framework, hence the use of JAXB). The following code works fine by itself (i.e. on a desktop machine, as an Eclipse Java project) but fails to run on Android: Serializer serial = new Persister(); File f = new File("somefilename.xml"); ItemCollection itemCollection = serial.read(ItemCollection.class, f); The exception stack is below. This is happening because JAXB annotations used on the ItemCollection class are not available on Android devices. Is it possible somehow to ignore these annotations while using Simple on an Android device? Does it require code change or is a workaround possible? Thanks in advance for your help. TE 08-28 13:54:15.000: ERROR/AndroidRuntime(605): java.lang.NoClassDefFoundError: javax.xml.bind.annotation.XmlAccessorType 08-28 13:54:15.000: ERROR/AndroidRuntime(605): at java.lang.Class.getDeclaredAnnotations(Native Method) 08-28 13:54:15.000: ERROR/AndroidRuntime(605): at java.lang.Class.getAnnotations(Class.java:317) 08-28 13:54:15.000: ERROR/AndroidRuntime(605): at java.lang.Class.getAnnotation(Class.java:287) 08-28 13:54:15.000: ERROR/AndroidRuntime(605): at java.lang.Class.isAnnotationPresent(Class.java:1274) 08-28 13:54:15.000: ERROR/AndroidRuntime(605): at org.simpleframework.xml.core.ClassScanner.namespace(ClassScanner.java:389) 08-28 13:54:15.000: ERROR/AndroidRuntime(605): at org.simpleframework.xml.core.ClassScanner.global(ClassScanner.java:306) 08-28 13:54:15.000: ERROR/AndroidRuntime(605): at org.simpleframework.xml.core.ClassScanner.scan(ClassScanner.java:287) 08-28 13:54:15.000: ERROR/AndroidRuntime(605): at org.simpleframework.xml.core.ClassScanner.<init>(ClassScanner.java:114) 08-28 13:54:15.000: ERROR/AndroidRuntime(605): at org.simpleframework.xml.core.Scanner.<init>(Scanner.java:88) 08-28 13:54:15.000: ERROR/AndroidRuntime(605): at org.simpleframework.xml.core.ScannerFactory.getInstance(ScannerFactory.java:66) 08-28 13:54:15.000: ERROR/AndroidRuntime(605): at org.simpleframework.xml.core.Support.getScanner(Support.java:170) 08-28 13:54:15.000: ERROR/AndroidRuntime(605): at org.simpleframework.xml.core.Source.getScanner(Source.java:281) 08-28 13:54:15.000: ERROR/AndroidRuntime(605): at org.simpleframework.xml.core.Source.getSchema(Source.java:327) 08-28 13:54:15.000: ERROR/AndroidRuntime(605): at org.simpleframework.xml.core.Composite.read(Composite.java:200) 08-28 13:54:15.000: ERROR/AndroidRuntime(605): at org.simpleframework.xml.core.Composite.read(Composite.java:150) 08-28 13:54:15.000: ERROR/AndroidRuntime(605): at org.simpleframework.xml.core.Traverser.read(Traverser.java:92) 08-28 13:54:15.000: ERROR/AndroidRuntime(605): at org.simpleframework.xml.core.Persister.read(Persister.java:632) 08-28 13:54:15.000: ERROR/AndroidRuntime(605): at org.simpleframework.xml.core.Persister.read(Persister.java:613) 08-28 13:54:15.000: ERROR/AndroidRuntime(605): at org.simpleframework.xml.core.Persister.read(Persister.java:591) 08-28 13:54:15.000: ERROR/AndroidRuntime(605): at org.simpleframework.xml.core.Persister.read(Persister.java:550) 08-28 13:54:15.000: ERROR/AndroidRuntime(605): at org.simpleframework.xml.core.Persister.read(Persister.java:528) 08-28 13:54:15.000: ERROR/AndroidRuntime(605): at org.simpleframework.xml.core.Persister.read(Persister.java:433) 08-28 13:54:15.000: ERROR/AndroidRuntime(605): at com.example.SimpleXmlTestActivity.test2(SimpleXmlTestActivity.java:52) 08-28 13:54:15.000: ERROR/AndroidRuntime(605): at com.example.SimpleXmlTestActivity.onCreate(SimpleXmlTestActivity.java:40) 08-28 13:54:15.000: ERROR/AndroidRuntime(605): at android.app.Instrumentation.callActivityOnCreate(Instrumentation.java:1047) 08-28 13:54:15.000: ERROR/AndroidRuntime(605): at android.app.ActivityThread.performLaunchActivity(ActivityThread.java:1611) 08-28 13:54:15.000: ERROR/AndroidRuntime(605): at android.app.ActivityThread.handleLaunchActivity(ActivityThread.java:1663) 08-28 13:54:15.000: ERROR/AndroidRuntime(605): at android.app.ActivityThread.access$1500(ActivityThread.java:117) 08-28 13:54:15.000: ERROR/AndroidRuntime(605): at android.app.ActivityThread$H.handleMessage(ActivityThread.java:931) 08-28 13:54:15.000: ERROR/AndroidRuntime(605): at android.os.Handler.dispatchMessage(Handler.java:99) 08-28 13:54:15.000: ERROR/AndroidRuntime(605): at android.os.Looper.loop(Looper.java:130) 08-28 13:54:15.000: ERROR/AndroidRuntime(605): at android.app.ActivityThread.main(ActivityThread.java:3683) 08-28 13:54:15.000: ERROR/AndroidRuntime(605): at java.lang.reflect.Method.invokeNative(Native Method) 08-28 13:54:15.000: ERROR/AndroidRuntime(605): at java.lang.reflect.Method.invoke(Method.java:507) 08-28 13:54:15.000: ERROR/AndroidRuntime(605): at com.android.internal.os.ZygoteInit$MethodAndArgsCaller.run(ZygoteInit.java:839) 08-28 13:54:15.000: ERROR/AndroidRuntime(605): at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:597) 08-28 13:54:15.000: ERROR/AndroidRuntime(605): at dalvik.system.NativeStart.main(Native Method) -----Inline Attachment Follows----- ------------------------------------------------------------------------------ Special Offer -- Download ArcSight Logger for FREE! Finally, a world-class log management solution at an even better price-free! And you'll get a free "Love Thy Logs" t-shirt when you download Logger. Secure your free ArcSight Logger TODAY! http://p.sf.net/sfu/arcsisghtdev2dev -----Inline Attachment Follows----- _______________________________________________ Simple-support mailing list Sim...@li... https://lists.sourceforge.net/lists/listinfo/simple-support |
|
From: Jebarlin R. <jeb...@gm...> - 2011-09-09 12:08:42
|
Hi, *Could anyone give me solution for the following Issues?* Can I use Simple XML parser for parsing MS Office 2007 documents? I am trying to parse MS Office 2007 document by using Simple, but for a big document, when I add more java files with more annotation, it is taking more time to parse the XML. For ex; I added ElementListUnion in most of the classes to identify the same type of element. Can anyone please give me a solution for performance issue when I parse a big XML file with more java files(more than 500 files) and annotation? Thanks in advance. -- Thanks & Regards, Jebarlin Robertson.R GSM: 91-9538106181. |
|
From: A K <ak....@gm...> - 2011-09-08 09:26:56
|
Hi,
Am working with an android project and using Simple XML serialization api's
to parse the xml data. I have a prototype of the code and am porting the
same to suit my project.
In this code, i have multiple class redirections to read the elements and
attributes. for ex, as below -
*public class A
{
private B b;
private C c;
private D d;
public B getB() {
return b;
}
public C getC() {
return c;
}
public D getD() {
return d;
}
}
public class B
{
@Element(name="x", required=false)
private X x;
@Element(name="y", required=false)
private Y y;
@Element(name="z", required=false)
private Z z;
}
*
When i try to retrieve the data from the Class A and call the getB method,
it is throwing an exception. I need to get the instance of the classB. I am
not able to provide the specific Element name to the classB in classA. If
anyone knows the solution. kindly let me know.
|
|
From: bubbleguuum <bub...@fr...> - 2011-09-07 21:16:44
|
Hi,
I'm serializing namespace heavy data structures and there's a lot of redundency in the output as the namespace is specified for each element. For example:
<DIDL-Lite xmlns="urn:schemas-upnp-org:metadata-1-0/DIDL-Lite/">
<item
id="T1020"
parentID="414">
<upnp:class xmlns:upnp="urn:schemas-upnp-org:metadata-1-0/upnp/">object.item.audioItem.musicTrack</upnp:class>
<dc:title xmlns:dc="http://purl.org/dc/elements/1.1/">2084</dc:title>
<upnp:albumArtURI
dlna:profileID="JPEG_TN"
xmlns:upnp="urn:schemas-upnp-org:metadata-1-0/upnp/"
xmlns:dlna="urn:schemas-dlna-org:metadata-1-0/">http://1.2.3.4:9050/stream/99ae0c9ea500a4e4c41b4694e75380b5</upnp:albumArtURI>
<upnp:artist
role="Performer"
xmlns:upnp="urn:schemas-upnp-org:metadata-1-0/upnp/">Redshape</upnp:artist>
<dc:creator xmlns:dc="http://purl.org/dc/elements/1.1/">Redshape</dc:creator>
<upnp:genre xmlns:upnp="urn:schemas-upnp-org:metadata-1-0/upnp/">Techno</upnp:genre>
<upnp:originalTrackNumber xmlns:upnp="urn:schemas-upnp-org:metadata-1-0/upnp/">1</upnp:originalTrackNumber>
<dc:date xmlns:dc="http://purl.org/dc/elements/1.1/">2006-01-02</dc:date>
<upnp:album xmlns:upnp="urn:schemas-upnp-org:metadata-1-0/upnp/">2084 / Ultra</upnp:album>
</item>
</DIDL-Lite>
The namespace if specified for each element that specify a @Namespace.
Is it possible to configure the serializer (or change the class definition) to put all namespaces at the root element like shown below:
<DIDL-Lite
xmlns="urn:schemas-upnp-org:metadata-1-0/DIDL-Lite/"
xmlns:upnp="urn:schemas-upnp-org:metadata-1-0/upnp/"
xmlns:dc="http://purl.org/dc/elements/1.1/"
xmlns:dlna="urn:schemas-dlna-org:metadata-1-0/">
<item
id="T1020"
parentID="414">
<upnp:class>object.item.audioItem.musicTrack</upnp:class>
<dc:title>2084</dc:title>
<upnp:albumArtURI dlna:profileID="JPEG_TN">http://1.2.3.4:9050/stream/99ae0c9ea500a4e4c41b4694e75380b5</upnp:albumArtURI>
<upnp:artist role="Performer">Redshape</upnp:artist>
<dc:creator>Redshape</dc:creator>
<upnp:genre>Techno</upnp:genre>
<upnp:originalTrackNumber>1</upnp:originalTrackNumber>
<dc:date>2006-01-02</dc:date>
<upnp:album>2084 / Ultra</upnp:album>
</item>
</DIDL-Lite>
|
|
From: James O. <Jam...@ip...> - 2011-09-06 22:29:23
|
Let's say I have an object (ID). ID: - Number - Version This can be easily expressed as a simple string in the format <number>-<version> e.g. 1234-1 In most cases I'd like to express this as an attribute for other xml elements (id="1234-1") However, it's currently in element format. e.g. <ID number="1234" version="1"> How do I get this annotated to read into and out of another object's element's attribute? e.g. <someOtherObject attribute1="blah blah" id="1234-1"/> To make this request more complicated, let's say I want to preserve some backwards compatibility and be able to deserialize the old element based XML, how would I do that? Can I serialize the ID as an element in some cases where it is specified as an @Element in one including object or as an attribute in another including object where it is annotated as @Attribute there? Thanks! |
|
From: Niall G. <gal...@ya...> - 2011-09-02 08:07:20
|
I am afraid not, Android just does not have these annotations. You could perhaps try add them to a jar and include them? But this is not something I have tried.
--- On Thu, 1/9/11, Tolga Ekmekci <al...@ho...> wrote:
From: Tolga Ekmekci <al...@ho...>
Subject: [Simple-support] Ignoring unavailable annotations (JAXB on Android devices)
To: sim...@li...
Received: Thursday, 1 September, 2011, 1:13 PM
Ignoring unavailable annotations (JAXB on Android devices)
Hello,
>From my research, it seems that Simple is the best XML serialization/deserialization framework available for Android. The API and the framework "feels right". Thank you very much for your efforts, esp. on getting it to work on Android. :-)
I have started experimenting with Simple features and one issue that I need help with is related to classes annotated both with JAXB and Simple (server side is a servlet implemented using JAX-RS via RestEasy framework, hence the use of JAXB). The following code works fine by itself (i.e. on a desktop machine, as an Eclipse Java project) but fails to run on Android:
Serializer serial = new Persister();
File f = new File("somefilename.xml");
ItemCollection itemCollection = serial.read(ItemCollection.class, f);
The exception stack is below. This is happening because JAXB annotations used on the ItemCollection class are not available on Android devices.
Is it possible somehow to ignore these annotations while using Simple on an Android device? Does it require code change or is a workaround possible?
Thanks in advance for your help.
TE
08-28 13:54:15.000: ERROR/AndroidRuntime(605): java.lang.NoClassDefFoundError: javax.xml.bind.annotation.XmlAccessorType
08-28 13:54:15.000: ERROR/AndroidRuntime(605): at java.lang.Class.getDeclaredAnnotations(Native Method)
08-28 13:54:15.000: ERROR/AndroidRuntime(605): at java.lang.Class.getAnnotations(Class.java:317)
08-28 13:54:15.000: ERROR/AndroidRuntime(605): at java.lang.Class.getAnnotation(Class.java:287)
08-28 13:54:15.000: ERROR/AndroidRuntime(605): at java.lang.Class.isAnnotationPresent(Class.java:1274)
08-28 13:54:15.000: ERROR/AndroidRuntime(605): at org.simpleframework.xml.core.ClassScanner.namespace(ClassScanner.java:389)
08-28 13:54:15.000: ERROR/AndroidRuntime(605): at org.simpleframework.xml.core.ClassScanner.global(ClassScanner.java:306)
08-28 13:54:15.000: ERROR/AndroidRuntime(605): at org.simpleframework.xml.core.ClassScanner.scan(ClassScanner.java:287)
08-28 13:54:15.000: ERROR/AndroidRuntime(605): at org.simpleframework.xml.core.ClassScanner.<init>(ClassScanner.java:114)
08-28 13:54:15.000: ERROR/AndroidRuntime(605): at org.simpleframework.xml.core.Scanner.<init>(Scanner.java:88)
08-28 13:54:15.000: ERROR/AndroidRuntime(605): at org.simpleframework.xml.core.ScannerFactory.getInstance(ScannerFactory.java:66)
08-28 13:54:15.000: ERROR/AndroidRuntime(605): at org.simpleframework.xml.core.Support.getScanner(Support.java:170)
08-28 13:54:15.000: ERROR/AndroidRuntime(605): at org.simpleframework.xml.core.Source.getScanner(Source.java:281)
08-28 13:54:15.000: ERROR/AndroidRuntime(605): at org.simpleframework.xml.core.Source.getSchema(Source.java:327)
08-28 13:54:15.000: ERROR/AndroidRuntime(605): at org.simpleframework.xml.core.Composite.read(Composite.java:200)
08-28 13:54:15.000: ERROR/AndroidRuntime(605): at org.simpleframework.xml.core.Composite.read(Composite.java:150)
08-28 13:54:15.000: ERROR/AndroidRuntime(605): at org.simpleframework.xml.core.Traverser.read(Traverser.java:92)
08-28 13:54:15.000: ERROR/AndroidRuntime(605): at org.simpleframework.xml.core.Persister.read(Persister.java:632)
08-28 13:54:15.000: ERROR/AndroidRuntime(605): at org.simpleframework.xml.core.Persister.read(Persister.java:613)
08-28 13:54:15.000: ERROR/AndroidRuntime(605): at org.simpleframework.xml.core.Persister.read(Persister.java:591)
08-28 13:54:15.000: ERROR/AndroidRuntime(605): at org.simpleframework.xml.core.Persister.read(Persister.java:550)
08-28 13:54:15.000: ERROR/AndroidRuntime(605): at org.simpleframework.xml.core.Persister.read(Persister.java:528)
08-28 13:54:15.000: ERROR/AndroidRuntime(605): at org.simpleframework.xml.core.Persister.read(Persister.java:433)
08-28 13:54:15.000: ERROR/AndroidRuntime(605): at com.example.SimpleXmlTestActivity.test2(SimpleXmlTestActivity.java:52)
08-28 13:54:15.000: ERROR/AndroidRuntime(605): at com.example.SimpleXmlTestActivity.onCreate(SimpleXmlTestActivity.java:40)
08-28 13:54:15.000: ERROR/AndroidRuntime(605): at android.app.Instrumentation.callActivityOnCreate(Instrumentation.java:1047)
08-28 13:54:15.000: ERROR/AndroidRuntime(605): at android.app.ActivityThread.performLaunchActivity(ActivityThread.java:1611)
08-28 13:54:15.000: ERROR/AndroidRuntime(605): at android.app.ActivityThread.handleLaunchActivity(ActivityThread.java:1663)
08-28 13:54:15.000: ERROR/AndroidRuntime(605): at android.app.ActivityThread.access$1500(ActivityThread.java:117)
08-28 13:54:15.000: ERROR/AndroidRuntime(605): at android.app.ActivityThread$H.handleMessage(ActivityThread.java:931)
08-28 13:54:15.000: ERROR/AndroidRuntime(605): at android.os.Handler.dispatchMessage(Handler.java:99)
08-28 13:54:15.000: ERROR/AndroidRuntime(605): at android.os.Looper.loop(Looper.java:130)
08-28 13:54:15.000: ERROR/AndroidRuntime(605): at android.app.ActivityThread.main(ActivityThread.java:3683)
08-28 13:54:15.000: ERROR/AndroidRuntime(605): at java.lang.reflect.Method.invokeNative(Native Method)
08-28 13:54:15.000: ERROR/AndroidRuntime(605): at java.lang.reflect.Method.invoke(Method.java:507)
08-28 13:54:15.000: ERROR/AndroidRuntime(605): at com.android.internal.os.ZygoteInit$MethodAndArgsCaller.run(ZygoteInit.java:839)
08-28 13:54:15.000: ERROR/AndroidRuntime(605): at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:597)
08-28 13:54:15.000: ERROR/AndroidRuntime(605): at dalvik.system.NativeStart.main(Native Method)
-----Inline Attachment Follows-----
------------------------------------------------------------------------------
Special Offer -- Download ArcSight Logger for FREE!
Finally, a world-class log management solution at an even better
price-free! And you'll get a free "Love Thy Logs" t-shirt when you
download Logger. Secure your free ArcSight Logger TODAY!
http://p.sf.net/sfu/arcsisghtdev2dev
-----Inline Attachment Follows-----
_______________________________________________
Simple-support mailing list
Sim...@li...
https://lists.sourceforge.net/lists/listinfo/simple-support
|
|
From: Jebarlin R. <jeb...@gm...> - 2011-09-02 06:35:45
|
Thank you Niall Gallaghe for your reply
I will try that ElementListUnion
If I found any difficulty, I will let u know ...
Thanks once again....
Regards,
Jebarlin
On Tue, Aug 30, 2011 at 4:59 PM, Niall Gallagher
<gal...@ya...>wrote:
> You need to use the ElementListUnion annotation, take a look at the
> tutorial, also, the test cases have many examples. e.g
>
> @ElementListUnion({
> @ElementList(entry="math", type=Math.class, inline=true),
> @ElementList(entry="science", type=Science.class, inline=true)
> })
>
> --- On *Tue, 30/8/11, Jebarlin Robertson <jeb...@gm...>* wrote:
>
>
> From: Jebarlin Robertson <jeb...@gm...>
> Subject: [Simple-support] Deserializing XML - @ElementList(entry="name",
> inline=true) - How to get the order of the element one by one?
> To: sim...@li...
> Received: Tuesday, 30 August, 2011, 12:11 AM
>
>
> Hi,
>
> I am new to this Simple XML, but I am feeling this very easy to use this.
>
> I have one problem.
>
> How can I get the order of the Element, if I have ElementList with
> "inline=true"?
> ex:
> {
> @ElementList(entry="name", inline=true)
> public List<Name> nameList;
> }
>
> For Example I have the following XML
>
> <Books>
> <Science>Science Book Name1</Science>
> <Science>Science Book Name2</Science>
> <Maths>Maths Book Name1</Maths>
> <Science>Science Book Name3</Science>
> <Maths>Maths Book Name2</Maths>
> </Books>
>
> When I deserialize the xml, I am able to get the List of Science book and
> List of Maths book.
>
> Can I get the Order of the Books Like this (Order of the Element one by
> one)?
>
> Science Book Name 1
> Science Book Name2
> Maths Book Name1
> Science Book Name3
> Maths Book Name2
>
>
> Can any one help me to solve this? and Is it possible to get the Order of
> Element one by one using Simple?
>
> Thanks in Advance.
>
>
> --
> Thanks & Regards,
> Jebarlin Robertson.R
>
> -----Inline Attachment Follows-----
>
>
> ------------------------------------------------------------------------------
> Special Offer -- Download ArcSight Logger for FREE!
> Finally, a world-class log management solution at an even better
> price-free! And you'll get a free "Love Thy Logs" t-shirt when you
> download Logger. Secure your free ArcSight Logger TODAY!
> http://p.sf.net/sfu/arcsisghtdev2dev
>
> -----Inline Attachment Follows-----
>
> _______________________________________________
> Simple-support mailing list
> Sim...@li...<http://mc/compose?to=...@li...>
> https://lists.sourceforge.net/lists/listinfo/simple-support
>
>
--
Thanks & Regards,
Jebarlin Robertson.R
GSM: 91-9538106181.
|
|
From: Tolga E. <al...@ho...> - 2011-09-01 20:13:52
|
Hello,
>From my research, it seems that Simple is the best XML
serialization/deserialization framework available for Android. The API and
the framework "feels right". Thank you very much for your efforts, esp. on
getting it to work on Android. :-)
I have started experimenting with Simple features and one issue that I need
help with is related to classes annotated both with JAXB and Simple (server
side is a servlet implemented using JAX-RS via RestEasy framework, hence the
use of JAXB). The following code works fine by itself (i.e. on a desktop
machine, as an Eclipse Java project) but fails to run on Android:
Serializer serial = new Persister();
File f = new File("somefilename.xml");
ItemCollection itemCollection = serial.read(ItemCollection.class, f);
The exception stack is below. This is happening because JAXB annotations
used on the ItemCollection class are not available on Android devices.
Is it possible somehow to ignore these annotations while using Simple on an
Android device? Does it require code change or is a workaround possible?
Thanks in advance for your help.
TE
08-28 13:54:15.000: ERROR/AndroidRuntime(605):
java.lang.NoClassDefFoundError: javax.xml.bind.annotation.XmlAccessorType
08-28 13:54:15.000: ERROR/AndroidRuntime(605): at
java.lang.Class.getDeclaredAnnotations(Native Method)
08-28 13:54:15.000: ERROR/AndroidRuntime(605): at
java.lang.Class.getAnnotations(Class.java:317)
08-28 13:54:15.000: ERROR/AndroidRuntime(605): at
java.lang.Class.getAnnotation(Class.java:287)
08-28 13:54:15.000: ERROR/AndroidRuntime(605): at
java.lang.Class.isAnnotationPresent(Class.java:1274)
08-28 13:54:15.000: ERROR/AndroidRuntime(605): at
org.simpleframework.xml.core.ClassScanner.namespace(ClassScanner.java:389)
08-28 13:54:15.000: ERROR/AndroidRuntime(605): at
org.simpleframework.xml.core.ClassScanner.global(ClassScanner.java:306)
08-28 13:54:15.000: ERROR/AndroidRuntime(605): at
org.simpleframework.xml.core.ClassScanner.scan(ClassScanner.java:287)
08-28 13:54:15.000: ERROR/AndroidRuntime(605): at
org.simpleframework.xml.core.ClassScanner.<init>(ClassScanner.java:114)
08-28 13:54:15.000: ERROR/AndroidRuntime(605): at
org.simpleframework.xml.core.Scanner.<init>(Scanner.java:88)
08-28 13:54:15.000: ERROR/AndroidRuntime(605): at
org.simpleframework.xml.core.ScannerFactory.getInstance(ScannerFactory.java:
66)
08-28 13:54:15.000: ERROR/AndroidRuntime(605): at
org.simpleframework.xml.core.Support.getScanner(Support.java:170)
08-28 13:54:15.000: ERROR/AndroidRuntime(605): at
org.simpleframework.xml.core.Source.getScanner(Source.java:281)
08-28 13:54:15.000: ERROR/AndroidRuntime(605): at
org.simpleframework.xml.core.Source.getSchema(Source.java:327)
08-28 13:54:15.000: ERROR/AndroidRuntime(605): at
org.simpleframework.xml.core.Composite.read(Composite.java:200)
08-28 13:54:15.000: ERROR/AndroidRuntime(605): at
org.simpleframework.xml.core.Composite.read(Composite.java:150)
08-28 13:54:15.000: ERROR/AndroidRuntime(605): at
org.simpleframework.xml.core.Traverser.read(Traverser.java:92)
08-28 13:54:15.000: ERROR/AndroidRuntime(605): at
org.simpleframework.xml.core.Persister.read(Persister.java:632)
08-28 13:54:15.000: ERROR/AndroidRuntime(605): at
org.simpleframework.xml.core.Persister.read(Persister.java:613)
08-28 13:54:15.000: ERROR/AndroidRuntime(605): at
org.simpleframework.xml.core.Persister.read(Persister.java:591)
08-28 13:54:15.000: ERROR/AndroidRuntime(605): at
org.simpleframework.xml.core.Persister.read(Persister.java:550)
08-28 13:54:15.000: ERROR/AndroidRuntime(605): at
org.simpleframework.xml.core.Persister.read(Persister.java:528)
08-28 13:54:15.000: ERROR/AndroidRuntime(605): at
org.simpleframework.xml.core.Persister.read(Persister.java:433)
08-28 13:54:15.000: ERROR/AndroidRuntime(605): at
com.example.SimpleXmlTestActivity.test2(SimpleXmlTestActivity.java:52)
08-28 13:54:15.000: ERROR/AndroidRuntime(605): at
com.example.SimpleXmlTestActivity.onCreate(SimpleXmlTestActivity.java:40)
08-28 13:54:15.000: ERROR/AndroidRuntime(605): at
android.app.Instrumentation.callActivityOnCreate(Instrumentation.java:1047)
08-28 13:54:15.000: ERROR/AndroidRuntime(605): at
android.app.ActivityThread.performLaunchActivity(ActivityThread.java:1611)
08-28 13:54:15.000: ERROR/AndroidRuntime(605): at
android.app.ActivityThread.handleLaunchActivity(ActivityThread.java:1663)
08-28 13:54:15.000: ERROR/AndroidRuntime(605): at
android.app.ActivityThread.access$1500(ActivityThread.java:117)
08-28 13:54:15.000: ERROR/AndroidRuntime(605): at
android.app.ActivityThread$H.handleMessage(ActivityThread.java:931)
08-28 13:54:15.000: ERROR/AndroidRuntime(605): at
android.os.Handler.dispatchMessage(Handler.java:99)
08-28 13:54:15.000: ERROR/AndroidRuntime(605): at
android.os.Looper.loop(Looper.java:130)
08-28 13:54:15.000: ERROR/AndroidRuntime(605): at
android.app.ActivityThread.main(ActivityThread.java:3683)
08-28 13:54:15.000: ERROR/AndroidRuntime(605): at
java.lang.reflect.Method.invokeNative(Native Method)
08-28 13:54:15.000: ERROR/AndroidRuntime(605): at
java.lang.reflect.Method.invoke(Method.java:507)
08-28 13:54:15.000: ERROR/AndroidRuntime(605): at
com.android.internal.os.ZygoteInit$MethodAndArgsCaller.run(ZygoteInit.java:8
39)
08-28 13:54:15.000: ERROR/AndroidRuntime(605): at
com.android.internal.os.ZygoteInit.main(ZygoteInit.java:597)
08-28 13:54:15.000: ERROR/AndroidRuntime(605): at
dalvik.system.NativeStart.main(Native Method)
|
|
From: Niall G. <gal...@ya...> - 2011-09-01 12:41:58
|
The location is -1 when you are using DOM or when StAX does not have line support enabled. --- On Thu, 1/9/11, Aaron Digulla <di...@he...> wrote: > From: Aaron Digulla <di...@he...> > Subject: [Simple-support] Error at line -1 > To: sim...@li... > Received: Thursday, 1 September, 2011, 5:33 AM > Hi Niall, > > Thanks for your great product. I just have an issue which > is probably > somewhere in the XML parser (i.e. outside simple) but maybe > you know a > solution anyway: The location in the file is always "line > -1". > > It seems that the default XML parser doesn't track the > location. > > Please also answer the question on stackoverflow.com: > > http://stackoverflow.com/questions/7268499/error-at-line-1-when-using-simplexml-to-parse-xml > > Regards, > > -- > 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/ > > ------------------------------------------------------------------------------ > Special Offer -- Download ArcSight Logger for FREE! > Finally, a world-class log management solution at an even > better > price-free! And you'll get a free "Love Thy Logs" t-shirt > when you > download Logger. Secure your free ArcSight Logger TODAY! > http://p.sf.net/sfu/arcsisghtdev2dev > _______________________________________________ > Simple-support mailing list > Sim...@li... > https://lists.sourceforge.net/lists/listinfo/simple-support > |
|
From: Aaron D. <di...@he...> - 2011-09-01 12:33:53
|
Hi Niall, Thanks for your great product. I just have an issue which is probably somewhere in the XML parser (i.e. outside simple) but maybe you know a solution anyway: The location in the file is always "line -1". It seems that the default XML parser doesn't track the location. Please also answer the question on stackoverflow.com: http://stackoverflow.com/questions/7268499/error-at-line-1-when-using-simplexml-to-parse-xml Regards, -- 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/ |
|
From: Niall G. <gal...@ya...> - 2011-08-31 09:02:55
|
Hi,
It cant be done with annotations like this, you can try a converter which should work. This should consume the whole outer element, to it will need to read the text and the element.
There sould be examples in the test cases.
Niall
--- On Tue, 30/8/11, Lee Jorgensen <n0...@co...> wrote:
From: Lee Jorgensen <n0...@co...>
Subject: [Simple-support] Text with Element?
To: sim...@li...
Received: Tuesday, 30 August, 2011, 8:37 PM
Per the tutorial:
The rules that govern the use of the Text
annotation are that there can only be one per schema class. Also,
this annotation cannot be used with the Element
annotation. Only the Attribute
annotation can be used with it as this annotation does not add any
content within the owning element.
... I fully understand why, and the reasons behind it. Now onto my
problem, I'm trying to decode XML that is produced (I don't have to
create it, just read), and they have the schema as such:
<creation-center>
<sub-center>subcenter info</sub-center>
creationcenter info
</creation-center>
The schema that I need to decode is:
-----
<xsd:complexType name="sourceType">
<xsd:all>
...
<xsd:element name="creation-center"
type="creation-centerType" minOccurs="0" maxOccurs="1"/>
...
</xsd:all>
</xsd:complexType>
<xsd:complexType name="creation-centerType" mixed="true">
<xsd:sequence>
<xsd:element name="sub-center" type="xsd:string"
minOccurs="0" maxOccurs="1"/>
</xsd:sequence>
</xsd:complexType>
-----
My class that I'm currently trying to get to decode this XML is:
import org.simpleframework.xml.Element;
import org.simpleframework.xml.Text;
@Element(name="creation-center")
public class CreationCenter {
// @Element(name="sub-center", required=false)
// private String sub_center;
@Text
private String creation_center;
////
// public String getSub_Center() {
// return sub_center;
// }
public String getCreation_Center() {
return creation_center;
}
}
If I don't comment out the "sub-center" element, the XML fails to
parse, obviously. How can I get both the main element text and the
sub-element?
Thanks.
-Lee.
-----Inline Attachment Follows-----
------------------------------------------------------------------------------
Special Offer -- Download ArcSight Logger for FREE!
Finally, a world-class log management solution at an even better
price-free! And you'll get a free "Love Thy Logs" t-shirt when you
download Logger. Secure your free ArcSight Logger TODAY!
http://p.sf.net/sfu/arcsisghtdev2dev
-----Inline Attachment Follows-----
_______________________________________________
Simple-support mailing list
Sim...@li...
https://lists.sourceforge.net/lists/listinfo/simple-support
|
|
From: Lee J. <n0...@co...> - 2011-08-31 04:04:46
|
Per the tutorial: The rules that govern the use of the Text <http://simple.sourceforge.net/download/stream/doc/javadoc/org/simpleframework/xml/Text.html> annotation are that there can only be one per schema class. Also, this annotation cannot be used with the |Element| annotation. Only the Attribute <http://simple.sourceforge.net/download/stream/doc/javadoc/org/simpleframework/xml/Attribute.html> annotation can be used with it as this annotation does not add any content within the owning element. ... I fully understand why, and the reasons behind it. Now onto my problem, I'm trying to decode XML that is produced (I don't have to create it, just read), and they have the schema as such: <creation-center> <sub-center>subcenter info</sub-center> creationcenter info </creation-center> The schema that I need to decode is: ----- <xsd:complexType name="sourceType"> <xsd:all> ... <xsd:element name="creation-center" type="creation-centerType" minOccurs="0" maxOccurs="1"/> ... </xsd:all> </xsd:complexType> <xsd:complexType name="creation-centerType" mixed="true"> <xsd:sequence> <xsd:element name="sub-center" type="xsd:string" minOccurs="0" maxOccurs="1"/> </xsd:sequence> </xsd:complexType> ----- My class that I'm currently trying to get to decode this XML is: import org.simpleframework.xml.Element; import org.simpleframework.xml.Text; @Element(name="creation-center") public class CreationCenter { // @Element(name="sub-center", required=false) // private String sub_center; @Text private String creation_center; //// // public String getSub_Center() { // return sub_center; // } public String getCreation_Center() { return creation_center; } } If I don't comment out the "sub-center" element, the XML fails to parse, obviously. How can I get both the main element text and the sub-element? Thanks. -Lee. |
|
From: Niall G. <gal...@ya...> - 2011-08-30 11:29:27
|
You need to use the ElementListUnion annotation, take a look at the tutorial, also, the test cases have many examples. e.g
@ElementListUnion({
@ElementList(entry="math", type=Math.class, inline=true),
@ElementList(entry="science", type=Science.class, inline=true)
})
--- On Tue, 30/8/11, Jebarlin Robertson <jeb...@gm...> wrote:
From: Jebarlin Robertson <jeb...@gm...>
Subject: [Simple-support] Deserializing XML - @ElementList(entry="name", inline=true) - How to get the order of the element one by one?
To: sim...@li...
Received: Tuesday, 30 August, 2011, 12:11 AM
Hi,
I am new to this Simple XML, but I am feeling this very easy to use this.
I have one problem. How can I get the order of the Element, if I have ElementList with "inline=true"?
ex:{ @ElementList(entry="name", inline=true) public List<Name> nameList;}
For Example I have the following XML
<Books> <Science>Science Book Name1</Science> <Science>Science Book Name2</Science> <Maths>Maths Book Name1</Maths> <Science>Science Book Name3</Science>
<Maths>Maths Book Name2</Maths></Books>
When I deserialize the xml, I am able to get the List of Science book and List of Maths book.
Can I get the Order of the Books Like this (Order of the Element one by one)?
Science Book Name 1Science Book Name2Maths Book Name1Science Book Name3Maths Book Name2
Can any one help me to solve this? and Is it possible to get the Order of Element one by one using Simple?
Thanks in Advance.
--
Thanks & Regards,
Jebarlin Robertson.R
-----Inline Attachment Follows-----
------------------------------------------------------------------------------
Special Offer -- Download ArcSight Logger for FREE!
Finally, a world-class log management solution at an even better
price-free! And you'll get a free "Love Thy Logs" t-shirt when you
download Logger. Secure your free ArcSight Logger TODAY!
http://p.sf.net/sfu/arcsisghtdev2dev
-----Inline Attachment Follows-----
_______________________________________________
Simple-support mailing list
Sim...@li...
https://lists.sourceforge.net/lists/listinfo/simple-support
|
|
From: Jebarlin R. <jeb...@gm...> - 2011-08-30 07:11:35
|
Hi,
I am new to this Simple XML, but I am feeling this very easy to use this.
I have one problem.
How can I get the order of the Element, if I have ElementList with
"inline=true"?
ex:
{
@ElementList(entry="name", inline=true)
public List<Name> nameList;
}
For Example I have the following XML
<Books>
<Science>Science Book Name1</Science>
<Science>Science Book Name2</Science>
<Maths>Maths Book Name1</Maths>
<Science>Science Book Name3</Science>
<Maths>Maths Book Name2</Maths>
</Books>
When I deserialize the xml, I am able to get the List of Science book and
List of Maths book.
Can I get the Order of the Books Like this (Order of the Element one by
one)?
Science Book Name 1
Science Book Name2
Maths Book Name1
Science Book Name3
Maths Book Name2
Can any one help me to solve this? and Is it possible to get the Order of
Element one by one using Simple?
Thanks in Advance.
--
Thanks & Regards,
Jebarlin Robertson.R
|
|
From: Niall G. <gal...@ya...> - 2011-08-28 08:07:38
|
Hi, I have just released a new version of simple, which increases the capabilities of the @Path annotation and also fixed some bugs with union annotations. Thanks, Niall |
|
From: Niall G. <gal...@ya...> - 2011-08-18 12:50:52
|
You can use the org.simpleframework.xml.stream.Format object, this allows you to specify a prolog. It can be passed to the Persister constructor. Niall --- On Tue, 2/8/11, sen...@gm... <sen...@gm...> wrote: > From: sen...@gm... <sen...@gm...> > Subject: [Simple-support] Generate line with xml version number > To: sim...@li... > Received: Tuesday, 2 August, 2011, 3:36 PM > Hello! > > I use Simple to serialize Java code to XML. > > How can I create this typical first-line of an XML > document, where it says version x and encoding y? > > Like this: > <?xml version="1.0" encoding="UTF-8"?> > > Is there any special annotation or argument for that? I > work with the code from the website's tutorial section. > > Tnx & cu > Bernd > -- > NEU: FreePhone - 0ct/min Handyspartarif mit > Geld-zurück-Garantie! > > Jetzt informieren: http://www.gmx.net/de/go/freephone > > ------------------------------------------------------------------------------ > Get a FREE DOWNLOAD! and learn more about uberSVN rich > system, > user administration capabilities and model configuration. > Take > the hassle out of deploying and managing Subversion and the > > tools developers use with it. http://p.sf.net/sfu/wandisco-d2d-2 > _______________________________________________ > Simple-support mailing list > Sim...@li... > https://lists.sourceforge.net/lists/listinfo/simple-support > |
|
From: Niall G. <gal...@ya...> - 2011-08-18 12:49:31
|
Hi,
This looks cool, I have not built an RPM for Simple before, however I know there is a deb file. I may add this to the download so that future users can build an RPM if required.
Thanks,
Niall
--- On Sun, 14/8/11, Michael Jones <mj...@cy...> wrote:
> From: Michael Jones <mj...@cy...>
> Subject: [Simple-support] contribution: RPM Package for simple-xml
> To: sim...@li...
> Received: Sunday, 14 August, 2011, 3:40 PM
> Hi List.
>
> Firstly, I'm not subscribed, so please direct
> any replys to both myself and the mailing list.
>
> I've created an RPM package for simple-xml.
> We use it in a few of our internal applications, and needed
> a way to handle upgrades to newer versions.
>
> Here's the specfile for the package
>
>
> Name: simple-xml
> Version: 2.6
> Release: 1%{?dist}
> Summary: The Simple XML Serialization
> framework
>
> URL: http://simple.sourceforge.net
> Source: simple-xml-%{version}.tar.gz
>
> BuildRoot:
> %{_tmppath}/%{name}-%{version}-%{release}-root-%(%{__id_u}
> -n)
> Group: Development/Libraries
> License: Apache 2.0
> BuildArch: noarch
>
> %description
> Simple is a high performance XML serialization and
> configuration framework for Java. Its goal is to provide an
> XML framework that enables rapid development of XML
> configuration and communication systems. This framework aids
> the development of XML systems with minimal effort and
> reduced errors. It offers full object serialization and
> deserialization, maintaining each reference encountered. In
> essence it is similar to C# XML serialization for the Java
> platform, but offers additional features for interception
> and manipulation
>
> %prep
> %setup -q
>
> %build
> ant
>
> %install
>
> rm -rf %{buildroot}
> mkdir -p %{buildroot}/usr/share/java/
> cp jar/simple-xml-%{version}.jar
> %{buildroot}/usr/share/java/
> ln -sf /usr/share/java/simple-xml-%{version}.jar
> %{buildroot}/usr/share/java/simple-xml.jar
>
> %files
> /usr/share/java/simple-xml-%{version}.jar
> /usr/share/java/simple-xml.jar
>
> %post
>
> %clean
> rm -rf $RPM_BUILD_ROOT
>
> %changelog
> * Sun Aug 14 2011 Michael Jones <mj...@ep...>
> 2.6-1
> - Initial package.
>
> Attached to this email is the src.rpm file and rpm file
> generated by the rpmbuild program.
>
> This rpm file should work on any RPM based linux
> distribution, and delivers two files
> /usr/share/java/simple-xml-2.6.jar
> and a symlink to that file at
> /usr/share/java/simple-xml.jar
>
>
> I am authorized by my employer to release this src.rpm, rpm
> and specfile under the Apache 2.0 license. No modifications
> or patches to simple-xml were needed to create the src rpm.
>
> Cheers
>
>
> -- Michael Jones
> Software Engineer
> CyberMetrix
> 2860 N National Rd #A
> Columbus, IN 47201-4746 USA
> 812-375-5868
>
>
> -----Inline Attachment Follows-----
>
> ------------------------------------------------------------------------------
> Get a FREE DOWNLOAD! and learn more about uberSVN rich
> system,
> user administration capabilities and model configuration.
> Take
> the hassle out of deploying and managing Subversion and the
>
> tools developers use with it. http://p.sf.net/sfu/wandisco-d2d-2
> -----Inline Attachment Follows-----
>
> _______________________________________________
> Simple-support mailing list
> Sim...@li...
> https://lists.sourceforge.net/lists/listinfo/simple-support
>
|
|
From: Niall G. <gal...@ya...> - 2011-08-18 12:46:37
|
I see there was an answer posted, using an Integer instead of an int :) --- On Mon, 8/8/11, Bram Vandenbussche <br...@br...> wrote: From: Bram Vandenbussche <br...@br...> Subject: [Simple-support] How to avoid serializing zero values with Simple Xml To: sim...@li... Received: Monday, 8 August, 2011, 11:57 AM Hey all, I'm guessing there is a way of doing this, but I just can't figure out how. The question, and all of the information, can be viewed at stackoverflow: http://stackoverflow.com/questions/6932250/how-to-avoid-serializing-zero-values-with-simple-xml Any response is appreciated. kind regards, Bram Vandenbussche // www.bramensofie.be // +32 497 21 33 04 -----Inline Attachment Follows----- ------------------------------------------------------------------------------ Get a FREE DOWNLOAD! and learn more about uberSVN rich system, user administration capabilities and model configuration. Take the hassle out of deploying and managing Subversion and the tools developers use with it. http://p.sf.net/sfu/wandisco-d2d-2 -----Inline Attachment Follows----- _______________________________________________ Simple-support mailing list Sim...@li... https://lists.sourceforge.net/lists/listinfo/simple-support |
|
From: Niall G. <gal...@ya...> - 2011-08-18 08:33:35
|
Hi Michael, Thanks, its always great to hear feedback like this. I am glad Simple has worked out for you in so many diverse environments. Cheers, Niall --- On Wed, 17/8/11, Michael Tecourt <mic...@gm...> wrote: From: Michael Tecourt <mic...@gm...> Subject: [Simple-support] Feedback To: sim...@li... Received: Wednesday, 17 August, 2011, 12:56 AM Hi guys, Just wanted to thank your team for the great work. I was looking for a serialization framework that would get along well with Google App Engine, GWT and Android at the same time. - Simple annotations work with GWT and don't prevent your objects from being serialized through GWT RPC - Simple fits in Google App Engine quite restrictive environement since you can work with streams and writers, not only files - Android integration is seamless No head scraching dependencies & configuration... a great, easy to use, all around framework! That's what JAXB should have looked like to me. Regards, Michael "Ako" Tecourt GleamFootball.com -----Inline Attachment Follows----- ------------------------------------------------------------------------------ Get a FREE DOWNLOAD! and learn more about uberSVN rich system, user administration capabilities and model configuration. Take the hassle out of deploying and managing Subversion and the tools developers use with it. http://p.sf.net/sfu/wandisco-d2d-2 -----Inline Attachment Follows----- _______________________________________________ Simple-support mailing list Sim...@li... https://lists.sourceforge.net/lists/listinfo/simple-support |
|
From: Michael T. <mic...@gm...> - 2011-08-17 07:56:51
|
Hi guys, Just wanted to thank your team for the great work. I was looking for a serialization framework that would get along well with Google App Engine, GWT and Android at the same time. - Simple annotations work with GWT and don't prevent your objects from being serialized through GWT RPC - Simple fits in Google App Engine quite restrictive environement since you can work with streams and writers, not only files - Android integration is seamless No head scraching dependencies & configuration... a great, easy to use, all around framework! That's what JAXB should have looked like to me. Regards, Michael "Ako" Tecourt GleamFootball.com |
|
From: Michael J. <mj...@cy...> - 2011-08-14 23:00:50
|
Hi List.
Firstly, I'm not subscribed, so please direct any replys to both
myself and the mailing list.
I've created an RPM package for simple-xml. We use it in a few of
our internal applications, and needed a way to handle upgrades to newer
versions.
Here's the specfile for the package
Name: simple-xml
Version: 2.6
Release: 1%{?dist}
Summary: The Simple XML Serialization framework
URL: http://simple.sourceforge.net
Source: simple-xml-%{version}.tar.gz
BuildRoot: %{_tmppath}/%{name}-%{version}-%{release}-root-%(%{__id_u} -n)
Group: Development/Libraries
License: Apache 2.0
BuildArch: noarch
%description
Simple is a high performance XML serialization and configuration
framework for Java. Its goal is to provide an XML framework that enables
rapid development of XML configuration and communication systems. This
framework aids the development of XML systems with minimal effort and
reduced errors. It offers full object serialization and deserialization,
maintaining each reference encountered. In essence it is similar to C#
XML serialization for the Java platform, but offers additional features
for interception and manipulation
%prep
%setup -q
%build
ant
%install
rm -rf %{buildroot}
mkdir -p %{buildroot}/usr/share/java/
cp jar/simple-xml-%{version}.jar %{buildroot}/usr/share/java/
ln -sf /usr/share/java/simple-xml-%{version}.jar
%{buildroot}/usr/share/java/simple-xml.jar
%files
/usr/share/java/simple-xml-%{version}.jar
/usr/share/java/simple-xml.jar
%post
%clean
rm -rf $RPM_BUILD_ROOT
%changelog
* Sun Aug 14 2011 Michael Jones <mj...@ep...> 2.6-1
- Initial package.
Attached to this email is the src.rpm file and rpm file generated by the
rpmbuild program.
This rpm file should work on any RPM based linux distribution, and
delivers two files
/usr/share/java/simple-xml-2.6.jar
and a symlink to that file at
/usr/share/java/simple-xml.jar
I am authorized by my employer to release this src.rpm, rpm and specfile
under the Apache 2.0 license. No modifications or patches to simple-xml
were needed to create the src rpm.
Cheers
--
Michael Jones
Software Engineer
CyberMetrix
2860 N National Rd #A
Columbus, IN 47201-4746 USA
812-375-5868
|
|
From: Niall G. <gal...@ya...> - 2011-08-13 01:30:45
|
Check this out https://simple.svn.sourceforge.net/svnroot/simple/branches/location/src/test/java/org/simpleframework/xml/core/MapWithValueAttributeTest.java --- On Fri, 12/8/11, Gabi Kaltman <gka...@ya...> wrote: From: Gabi Kaltman <gka...@ya...> Subject: [Simple-support] Transforming a map To: "sim...@li..." <sim...@li...> Received: Friday, 12 August, 2011, 3:26 AM Hi, I'm new to Simple and I would like to ask you for some help. I have a class looking like: public void MyClass { private String type; private Map<String, String> nameToValueMap; } I can not manage to get this class serialized in the following:<type name1="value1", name2="value2".../> I tried with ElementMap annotation, but I can not get to:1. Inline the pairs (name,value) as attributes.2. Set the name of the node to the String type. Thank you very much,gabriel -----Inline Attachment Follows----- ------------------------------------------------------------------------------ Get a FREE DOWNLOAD! and learn more about uberSVN rich system, user administration capabilities and model configuration. Take the hassle out of deploying and managing Subversion and the tools developers use with it. http://p.sf.net/sfu/wandisco-dev2dev -----Inline Attachment Follows----- _______________________________________________ Simple-support mailing list Sim...@li... https://lists.sourceforge.net/lists/listinfo/simple-support |
|
From: Gabi K. <gka...@ya...> - 2011-08-12 13:09:05
|
Managed to do it using a converter. Maybe there is a simpler way as well..
Regards,
gabriel
________________________________
From: Gabi Kaltman <gka...@ya...>
To: "sim...@li..." <sim...@li...>
Sent: Friday, August 12, 2011 1:26 PM
Subject: [Simple-support] Transforming a map
Hi,
I'm new to Simple and I would like to ask you for some help.
I have a class looking like:
public void MyClass {
private String type;
private Map<String, String> nameToValueMap;
}
I can not manage to get this class serialized in the following:
<type name1="value1", name2="value2".../>
I tried with ElementMap annotation, but I can not get to:
1. Inline the pairs (name,value) as attributes.
2. Set the name of the node to the String type.
Thank you very much,
gabriel
------------------------------------------------------------------------------
Get a FREE DOWNLOAD! and learn more about uberSVN rich system,
user administration capabilities and model configuration. Take
the hassle out of deploying and managing Subversion and the
tools developers use with it.
http://p.sf.net/sfu/wandisco-dev2dev
_______________________________________________
Simple-support mailing list
Sim...@li...
https://lists.sourceforge.net/lists/listinfo/simple-support |
|
From: Gabi K. <gka...@ya...> - 2011-08-12 10:27:04
|
Hi,
I'm new to Simple and I would like to ask you for some help.
I have a class looking like:
public void MyClass {
private String type;
private Map<String, String> nameToValueMap;
}
I can not manage to get this class serialized in the following:
<type name1="value1", name2="value2".../>
I tried with ElementMap annotation, but I can not get to:
1. Inline the pairs (name,value) as attributes.
2. Set the name of the node to the String type.
Thank you very much,
gabriel
|