simple-support Mailing List for Simple (Page 8)
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: Robbie B. <Rob...@sa...> - 2013-02-20 14:56:22
|
Thanks for the quick response. On Feb 19, 2013, at 6:29 PM, Niall Gallagher - Yieldbroker <Nia...@yi...<mailto:Nia...@yi...>> wrote: Just ignore this, it should be a warning only, this references StAX which is not available on Android. SimpleXML will default to XmlPull From: Robbie Brown [mailto:Rob...@sa...<http://sas.com>] Sent: Wednesday, 20 February 2013 8:57 AM To: sim...@li...<mailto:sim...@li...> Subject: [Simple-support] Android's Lint reporting "Invalid package reference in library" The new Android developer tools (21.1) are reporting many cases of invalid package references in the SimpleXML library jar. To see the problem, go to "Window->Run Android Lint" in Eclipse. I'm using Eclipse 4.2.1and SimpleXML library 2.7. A typical line is: "Invalid package reference in library; not included in Android: javax.xml.stream. Referenced from org.simpleframework.xml.stream.StreamProvider." A similar issue has been reported for the Flurry library: http://code.google.com/p/android/issues/detail?id=42828 Google's response is: "This check is actually specifically there *for* 3rd party jars. If you try to use for example a Swing API from your Android project in Eclipse, it won't compile; the classpath does not include javax.swing so you won't accidentally reference it. However, if you pick up a random library Jar, it's totally possible that that Jar file is referencing classes that are not part of Android, which could lead to runtime crashes. That's what this lint check looks for. Either the flurry library is being careful to ensure that none of the APIs supported on Android end up accidentally calling into code which calls classes that aren't present, or there's a lurking bug in there. If you're certain it's fine, you could suppress this specific lint check; it would be even better if whoever built this library would create an Android-only version of the library containing only code needed to run on Android." Although it doesn't seem to be causing a problem, it is a little worrisome. Is the SimpleXML code simply being careful to avoid usage of classes not included in Android? Thanks. |
|
From: Niall G. - Y. <Nia...@yi...> - 2013-02-19 23:30:07
|
Just ignore this, it should be a warning only, this references StAX which is not available on Android. SimpleXML will default to XmlPull From: Robbie Brown [mailto:Rob...@sa...] Sent: Wednesday, 20 February 2013 8:57 AM To: sim...@li... Subject: [Simple-support] Android's Lint reporting "Invalid package reference in library" The new Android developer tools (21.1) are reporting many cases of invalid package references in the SimpleXML library jar. To see the problem, go to "Window->Run Android Lint" in Eclipse. I'm using Eclipse 4.2.1and SimpleXML library 2.7. A typical line is: "Invalid package reference in library; not included in Android: javax.xml.stream. Referenced from org.simpleframework.xml.stream.StreamProvider." A similar issue has been reported for the Flurry library: http://code.google.com/p/android/issues/detail?id=42828 Google's response is: "This check is actually specifically there *for* 3rd party jars. If you try to use for example a Swing API from your Android project in Eclipse, it won't compile; the classpath does not include javax.swing so you won't accidentally reference it. However, if you pick up a random library Jar, it's totally possible that that Jar file is referencing classes that are not part of Android, which could lead to runtime crashes. That's what this lint check looks for. Either the flurry library is being careful to ensure that none of the APIs supported on Android end up accidentally calling into code which calls classes that aren't present, or there's a lurking bug in there. If you're certain it's fine, you could suppress this specific lint check; it would be even better if whoever built this library would create an Android-only version of the library containing only code needed to run on Android." Although it doesn't seem to be causing a problem, it is a little worrisome. Is the SimpleXML code simply being careful to avoid usage of classes not included in Android? Thanks. |
|
From: Robbie B. <Rob...@sa...> - 2013-02-19 21:57:11
|
The new Android developer tools (21.1) are reporting many cases of invalid package references in the SimpleXML library jar. To see the problem, go to "Window->Run Android Lint" in Eclipse. I'm using Eclipse 4.2.1and SimpleXML library 2.7. A typical line is: "Invalid package reference in library; not included in Android: javax.xml.stream. Referenced from org.simpleframework.xml.stream.StreamProvider." A similar issue has been reported for the Flurry library: http://code.google.com/p/android/issues/detail?id=42828 Google's response is: "This check is actually specifically there *for* 3rd party jars. If you try to use for example a Swing API from your Android project in Eclipse, it won't compile; the classpath does not include javax.swing so you won't accidentally reference it. However, if you pick up a random library Jar, it's totally possible that that Jar file is referencing classes that are not part of Android, which could lead to runtime crashes. That's what this lint check looks for. Either the flurry library is being careful to ensure that none of the APIs supported on Android end up accidentally calling into code which calls classes that aren't present, or there's a lurking bug in there. If you're certain it's fine, you could suppress this specific lint check; it would be even better if whoever built this library would create an Android-only version of the library containing only code needed to run on Android." Although it doesn't seem to be causing a problem, it is a little worrisome. Is the SimpleXML code simply being careful to avoid usage of classes not included in Android? Thanks. |
|
From: Niall G. - Y. <Nia...@yi...> - 2013-02-18 22:08:00
|
The problem is with xmlns, it is a reserved attribute used for namespaces. From: Øivind André Thorvaldsen [mailto:oth...@gm...] Sent: Monday, 18 February 2013 7:17 PM To: sim...@li... Subject: [Simple-support] required value exception Hi. I am using simplexml with Android and I am stuck on a valuerequiredexception error. I have a post about the problem with details on stackoverflow. I will post the link: http://stackoverflow.com/questions/14900188/simplexml-valuerequired-exception Hope someone can help. Cheers Øivind Thorvaldsen |
|
From: Øivind A. T. <oth...@gm...> - 2013-02-18 08:17:24
|
Hi. I am using simplexml with Android and I am stuck on a valuerequiredexception error. I have a post about the problem with details on stackoverflow. I will post the link: http://stackoverflow.com/questions/14900188/simplexml-valuerequired-exception Hope someone can help. Cheers Øivind Thorvaldsen |
|
From: Niall G. <gal...@ya...> - 2013-02-13 21:13:22
|
Cool. I would be good if you could provide some details on how do to this. I could put it in to a tutorial section for anyone else that might want to do it. Thanks,Niall --- On Wed, 13/2/13, daniel echalar <da...@gm...> wrote: From: daniel echalar <da...@gm...> Subject: Re: [Simple-support] Simple framework and GWT To: sim...@li... Received: Wednesday, 13 February, 2013, 10:52 AM I added a package org.simpleframework and an xml.gwt.xml file containing: <module> <inherits name='com.google.gwt.user.User'/> <source path="xml"></source> </module> And it worked, of course the compiled simpleframework.jar should be in the classpath On 13 February 2013 12:35, daniel echalar <da...@gm...> wrote: Hi, I'm trying to use simpleframework in a GWT project, on google I found that the only way to add third party libraries is to add them with the sources included in the jar file,so I have compiled a simple-xml.2.6.9.jar that includes that and also an the gwt.xml file. But this error is thrown: Loading inherited module 'org.simpleframework.xml' [ERROR] Unable to find 'org/simpleframework/xml.gwt.xml' on your classpath; could be a typo, or maybe you forgot to include a classpath entry for source? [ERROR] Line 12: Unexpected exception while processing element 'inherits' com.google.gwt.core.ext.UnableToCompleteException: (see previous log entries) at com.google.gwt.dev.cfg.ModuleDefLoader.nestedLoad(ModuleDefLoader.java:308) ..... I tried to solve this error without success, however it seems to be just a file pointing issue, but at this point I'm starting to think that it is not possible (with simple framework) because of the GWT compiler restriction (https://developers.google.com/web-toolkit/doc/latest/DevGuideCodingBasicsCompatibility#runtime) So, does anybody have tried this? is this possible? if so, how? thanks -----Inline Attachment Follows----- ------------------------------------------------------------------------------ Free Next-Gen Firewall Hardware Offer Buy your Sophos next-gen firewall before the end March 2013 and get the hardware for free! Learn more. http://p.sf.net/sfu/sophos-d2d-feb -----Inline Attachment Follows----- _______________________________________________ Simple-support mailing list Sim...@li... https://lists.sourceforge.net/lists/listinfo/simple-support |
|
From: daniel e. <da...@gm...> - 2013-02-13 18:53:17
|
I added a package org.simpleframework and an xml.gwt.xml file containing: <module> <inherits name='com.google.gwt.user.User'/> <source path="xml"></source> </module> And it worked, of course the compiled simpleframework.jar should be in the classpath On 13 February 2013 12:35, daniel echalar <da...@gm...> wrote: > Hi, > > I'm trying to use simpleframework in a GWT project, on google I found that > the only way to add third party libraries is to add them with the sources > included in the jar file,so I have compiled a simple-xml.2.6.9.jar that > includes that and also an the gwt.xml file. But this error is thrown: > > Loading inherited module 'org.simpleframework.xml' > [ERROR] Unable to find 'org/simpleframework/xml.gwt.xml' on > your classpath; could be a typo, or maybe you forgot to include a classpath > entry for source? > [ERROR] Line 12: Unexpected exception while processing element > 'inherits' > com.google.gwt.core.ext.UnableToCompleteException: (see previous log > entries) > at > com.google.gwt.dev.cfg.ModuleDefLoader.nestedLoad(ModuleDefLoader.java:308) > ..... > > I tried to solve this error without success, however it seems to be just a > file pointing issue, but at this point I'm starting to think that it is not > possible (with simple framework) because of the GWT compiler restriction ( > https://developers.google.com/web-toolkit/doc/latest/DevGuideCodingBasicsCompatibility#runtime > ) > > So, does anybody have tried this? is this possible? if so, how? > > thanks > |
|
From: daniel e. <da...@gm...> - 2013-02-13 14:36:17
|
Hi,
I'm trying to use simpleframework in a GWT project, on google I found that
the only way to add third party libraries is to add them with the sources
included in the jar file,so I have compiled a simple-xml.2.6.9.jar that
includes that and also an the gwt.xml file. But this error is thrown:
Loading inherited module 'org.simpleframework.xml'
[ERROR] Unable to find 'org/simpleframework/xml.gwt.xml' on
your classpath; could be a typo, or maybe you forgot to include a classpath
entry for source?
[ERROR] Line 12: Unexpected exception while processing element
'inherits'
com.google.gwt.core.ext.UnableToCompleteException: (see previous log
entries)
at
com.google.gwt.dev.cfg.ModuleDefLoader.nestedLoad(ModuleDefLoader.java:308)
.....
I tried to solve this error without success, however it seems to be just a
file pointing issue, but at this point I'm starting to think that it is not
possible (with simple framework) because of the GWT compiler restriction (
https://developers.google.com/web-toolkit/doc/latest/DevGuideCodingBasicsCompatibility#runtime
)
So, does anybody have tried this? is this possible? if so, how?
thanks
|
|
From: Niall G. <gal...@ya...> - 2013-02-08 23:24:20
|
HI, Check it out via SVN here and do a "mvn clean install" https://simple.svn.sourceforge.net/svnroot/simple/trunk/download/stream/ Niall --- On Fri, 8/2/13, daniel echalar <da...@gm...> wrote: From: daniel echalar <da...@gm...> Subject: [Simple-support] Compile simple framework To: sim...@li... Received: Friday, 8 February, 2013, 12:01 PM Hi, Sorry, this is a noob question, anyway.. How can I compile the last version of simpleframework using git and maven? Thanks -----Inline Attachment Follows----- ------------------------------------------------------------------------------ Free Next-Gen Firewall Hardware Offer Buy your Sophos next-gen firewall before the end March 2013 and get the hardware for free! Learn more. http://p.sf.net/sfu/sophos-d2d-feb -----Inline Attachment Follows----- _______________________________________________ Simple-support mailing list Sim...@li... https://lists.sourceforge.net/lists/listinfo/simple-support |
|
From: daniel e. <da...@gm...> - 2013-02-08 20:02:47
|
Hi, Sorry, this is a noob question, anyway.. How can I compile the last version of simpleframework using git and maven? Thanks |
|
From: Niall G. - Y. <Nia...@yi...> - 2013-02-06 22:13:51
|
Sorry, @Commit is what you should use. @Complete is called when you have finished writing, @Commit is called when you finish reading. From: Jeffrey Blattman [mailto:jef...@gm...] Sent: Thursday, 7 February 2013 9:10 AM Cc: sim...@li... Subject: Re: [Simple-support] "serialization done" hook? thanks. it's not clear is @Commit or @Complete is the right choice. the javadocs are very similar. On Wed, Feb 6, 2013 at 1:59 PM, Niall Gallagher - Yieldbroker <Nia...@yi...<mailto:Nia...@yi...>> wrote: Try the @Complete annotation, methods with this are called after an object has deserialized From: Jeffrey Blattman [mailto:jef...@gm...<mailto:jef...@gm...>] Sent: Thursday, 7 February 2013 5:17 AM To: sim...@li...<mailto:sim...@li...> Subject: [Simple-support] "serialization done" hook? i want to execute some code when deserialization is finished. is there a way to do this? more about my problem ... i need to copy some data that's in one XML element into another, with the result in the deserialized object. i'm sort of fudging the resulting deserialized object. for example, <foo x="1"> <bar/> </foo> i have object Foo and Bar, and i want to insert the value for "x" to end up in one of Bar's fields. thanks. |
|
From: Jeffrey B. <jef...@gm...> - 2013-02-06 22:09:47
|
thanks. it's not clear is @Commit or @Complete is the right choice. the javadocs are very similar. On Wed, Feb 6, 2013 at 1:59 PM, Niall Gallagher - Yieldbroker < Nia...@yi...> wrote: > Try the @Complete annotation, methods with this are called after an > object has deserialized**** > > ** ** > > *From:* Jeffrey Blattman [mailto:jef...@gm...] > *Sent:* Thursday, 7 February 2013 5:17 AM > *To:* sim...@li... > *Subject:* [Simple-support] "serialization done" hook?**** > > ** ** > > i want to execute some code when deserialization is finished. is there a > way to do this?**** > > ** ** > > more about my problem ... i need to copy some data that's in one XML > element into another, with the result in the deserialized object. i'm sort > of fudging the resulting deserialized object. for example,**** > > ** ** > > <foo x="1">**** > > <bar/>**** > > </foo>**** > > ** ** > > i have object Foo and Bar, and i want to insert the value for "x" to end > up in one of Bar's fields.**** > > ** ** > > thanks.**** > |
|
From: Niall G. - Y. <Nia...@yi...> - 2013-02-06 21:59:16
|
Try the @Complete annotation, methods with this are called after an object has deserialized From: Jeffrey Blattman [mailto:jef...@gm...] Sent: Thursday, 7 February 2013 5:17 AM To: sim...@li... Subject: [Simple-support] "serialization done" hook? i want to execute some code when deserialization is finished. is there a way to do this? more about my problem ... i need to copy some data that's in one XML element into another, with the result in the deserialized object. i'm sort of fudging the resulting deserialized object. for example, <foo x="1"> <bar/> </foo> i have object Foo and Bar, and i want to insert the value for "x" to end up in one of Bar's fields. thanks. |
|
From: Jeffrey B. <jef...@gm...> - 2013-02-06 18:17:34
|
i want to execute some code when deserialization is finished. is there a way to do this? more about my problem ... i need to copy some data that's in one XML element into another, with the result in the deserialized object. i'm sort of fudging the resulting deserialized object. for example, <foo x="1"> <bar/> </foo> i have object Foo and Bar, and i want to insert the value for "x" to end up in one of Bar's fields. thanks. |
|
From: Alexander P. <ale...@er...> - 2013-01-30 08:53:56
|
Ok, thanks. I'll go for this then:
public String getValue() {
return (value != null) ? value : "";
}
Regards,
Alex
________________________________
From: Niall Gallagher - Yieldbroker [mailto:Nia...@yi...]
Sent: den 29 januari 2013 23:30
To: Alexander Poulikakos; sim...@li...
Subject: RE: [Simple-support] How to get an empty string, instead of null when reading @Text from element
Unfortunately, StAX does not allow differentiation between <property/> and <property></property> so there is no real way to tell "" from null. I think the check you mentioned would work best here, unless you think of some other way.
From: Alexander Poulikakos [mailto:ale...@er...]
Sent: Wednesday, 30 January 2013 4:49 AM
To: sim...@li...
Subject: [Simple-support] How to get an empty string, instead of null when reading @Text from element
Hi
I have the following xml element:
<property name="my-prop"></property>
When I read it as in example below, the call to prop.getValue() returns null. How to change it to return empty string instead?
Sure, I can have a check in PropertyExample.getValue() method to check if the value is null then return ""; But was wondering if that is the recommended solution or if there is a better solution? Similar to @Text(empty="").
Rgards,
Alex
###################
package com.ericsson.commonlibrary.cf.xml.parser;
import java.io.File;
import org.simpleframework.xml.Serializer;
import org.simpleframework.xml.core.Persister;
public class Example {
public static void main(String[] args) throws Throwable {
File xml = new File("C:\\temp\\simple-xml\\property.xml"); // xml contains this text: <property name="my-prop"></property>
Serializer s = new Persister();
PropertyExample prop = s.read(PropertyExample.class, xml);
System.out.println(prop.getValue());
}
}
###################
package example;
import org.simpleframework.xml.Attribute;
import org.simpleframework.xml.Root;
import org.simpleframework.xml.Text;
@Root(name="property")
final class PropertyExample {
@Attribute(name="name") private String name;
@Text(required=false, empty="") private String value;
PropertyExample(@Attribute(name="name") String name, @Text(required=false, empty="") String value) {
this.name = name;
this.value = value;
}
public String getName() {
return name;
}
public String getValue() {
return value;
}
}
###################
|
|
From: Niall G. - Y. <Nia...@yi...> - 2013-01-29 22:30:23
|
Unfortunately, StAX does not allow differentiation between <property/> and <property></property> so there is no real way to tell "" from null. I think the check you mentioned would work best here, unless you think of some other way.
From: Alexander Poulikakos [mailto:ale...@er...]
Sent: Wednesday, 30 January 2013 4:49 AM
To: sim...@li...
Subject: [Simple-support] How to get an empty string, instead of null when reading @Text from element
Hi
I have the following xml element:
<property name="my-prop"></property>
When I read it as in example below, the call to prop.getValue() returns null. How to change it to return empty string instead?
Sure, I can have a check in PropertyExample.getValue() method to check if the value is null then return ""; But was wondering if that is the recommended solution or if there is a better solution? Similar to @Text(empty="").
Rgards,
Alex
###################
package com.ericsson.commonlibrary.cf.xml.parser;
import java.io.File;
import org.simpleframework.xml.Serializer;
import org.simpleframework.xml.core.Persister;
public class Example {
public static void main(String[] args) throws Throwable {
File xml = new File("C:\\temp\\simple-xml\\property.xml"); // xml contains this text: <property name="my-prop"></property>
Serializer s = new Persister();
PropertyExample prop = s.read(PropertyExample.class, xml);
System.out.println(prop.getValue());
}
}
###################
package example;
import org.simpleframework.xml.Attribute;
import org.simpleframework.xml.Root;
import org.simpleframework.xml.Text;
@Root(name="property")
final class PropertyExample {
@Attribute(name="name") private String name;
@Text(required=false, empty="") private String value;
PropertyExample(@Attribute(name="name") String name, @Text(required=false, empty="") String value) {
this.name = name;
this.value = value;
}
public String getName() {
return name;
}
public String getValue() {
return value;
}
}
###################
|
|
From: Alexander P. <ale...@er...> - 2013-01-29 17:49:15
|
Hi
I have the following xml element:
<property name="my-prop"></property>
When I read it as in example below, the call to prop.getValue() returns null. How to change it to return empty string instead?
Sure, I can have a check in PropertyExample.getValue() method to check if the value is null then return ""; But was wondering if that is the recommended solution or if there is a better solution? Similar to @Text(empty="").
Rgards,
Alex
###################
package com.ericsson.commonlibrary.cf.xml.parser;
import java.io.File;
import org.simpleframework.xml.Serializer;
import org.simpleframework.xml.core.Persister;
public class Example {
public static void main(String[] args) throws Throwable {
File xml = new File("C:\\temp\\simple-xml\\property.xml"); // xml contains this text: <property name="my-prop"></property>
Serializer s = new Persister();
PropertyExample prop = s.read(PropertyExample.class, xml);
System.out.println(prop.getValue());
}
}
###################
package example;
import org.simpleframework.xml.Attribute;
import org.simpleframework.xml.Root;
import org.simpleframework.xml.Text;
@Root(name="property")
final class PropertyExample {
@Attribute(name="name") private String name;
@Text(required=false, empty="") private String value;
PropertyExample(@Attribute(name="name") String name, @Text(required=false, empty="") String value) {
this.name = name;
this.value = value;
}
public String getName() {
return name;
}
public String getValue() {
return value;
}
}
###################
|
|
From: Niall G. <gal...@ya...> - 2013-01-28 03:30:41
|
Try this
FileInputStream source = new FileInputStream("file.xml")InputStreamReader reader = new InputStreamReader(source, "UTF-8");Persister persister = new Persister();
persister.read(MyClass.class, reader)
--- On Sun, 27/1/13, Алексей Киреев <_l...@in...> wrote:
From: Алексей Киреев <_l...@in...>
Subject: Re: [Simple-support] Russian tags
To: "Niall Gallagher - Yieldbroker" <Nia...@yi...>
Cc: "sim...@li..." <sim...@li...>
Received: Sunday, 27 January, 2013, 1:51 PM
Thank you for answer. Is the way to check first line in XML file <?xml version="1.0" encoding="UTF-8"?> and get "encoding" attribute?
Понедельник, 21 января 2013, 22:43 UTC от Niall Gallagher - Yieldbroker <Nia...@yi...>:
This has more to do with the underlying StAX/DOM implementation. Make sure you reading in the UTF-8 charset.
From: Алексей Киреев [mailto:_l...@in...]
Sent: Tuesday, 22 January 2013 8:03 AM
To: sim...@li...
Subject: [Simple-support] Russian tags
It is able to deserealize document with russian tags? I try it with no success in inner tags (with @Element(name="russiantag"), outer tags are recognized with @Root(name="russiantag") or @Element(...) or @ElementList(...)
W/System.err(27616): org.simpleframework.xml.core.ValueRequiredException: Unable to satisfy @org.simpleframework.xml.Element(data=false, name=Адрес, required=true, type=class java.lang.String) on field 'clientAddress' public java.lang.String com.example.sxp.IBClient.clientAddress
for class com.example.sxp.IBClient at line 6
If i replace russian tags with english - all works ok.
-----Inline Attachment Follows-----
------------------------------------------------------------------------------
Master Visual Studio, SharePoint, SQL, ASP.NET, C# 2012, HTML5, CSS,
MVC, Windows 8 Apps, JavaScript and much more. Keep your skills current
with LearnDevNow - 3,200 step-by-step video tutorials by Microsoft
MVPs and experts. ON SALE this month only -- learn more at:
http://p.sf.net/sfu/learnnow-d2d
-----Inline Attachment Follows-----
_______________________________________________
Simple-support mailing list
Sim...@li...
https://lists.sourceforge.net/lists/listinfo/simple-support
|
|
From: Алексей К. <_l...@in...> - 2013-01-27 21:52:07
|
Thank you for answer. Is the way to check first line in XML file <?xml version="1.0" encoding="UTF-8"?> and get "encoding" attribute? Понедельник, 21 января 2013, 22:43 UTC от Niall Gallagher - Yieldbroker <Nia...@yi...>: >This has more to do with the underlying StAX/DOM implementation. Make sure you reading in the UTF-8 charset. > >From: Алексей Киреев [mailto:_l...@in...] >Sent: Tuesday, 22 January 2013 8:03 AM >To: sim...@li... >Subject: [Simple-support] Russian tags > >It is able to deserealize document with russian tags? I try it with no success in inner tags (with @Element(name="russiantag"), outer tags are recognized with @Root(name="russiantag") or @Element(...) or @ElementList(...) > >W/System.err(27616): org.simpleframework.xml.core.ValueRequiredException: Unable to satisfy @org.simpleframework.xml.Element(data=false, name=Адрес, required=true, type=class java.lang.String) on field 'clientAddress' public java.lang.String com.example.sxp.IBClient.clientAddress for class com.example.sxp.IBClient at line 6 > >If i replace russian tags with english - all works ok. |
|
From: Ashish G. <agu...@gm...> - 2013-01-24 01:48:32
|
So, ElementUnion would work for this.
@ElementUnion({
@Element(required=false,name = "abc" , type="abcType" ),
@Element(required=false,name = "xyz" , type ="xyzType")
})
On Wed, Jan 23, 2013 at 2:47 PM, Ashish Gupta <agu...@gm...>wrote:
> Hi,
>
> What annotation can be used for choice ?
>
> e.g.
> <choice>
> <element name="abc" type="abcType" />
> <element name="xyz" type="xyzType" />
> </choice>
>
>
|
|
From: Ashish G. <agu...@gm...> - 2013-01-23 22:47:42
|
Hi, What annotation can be used for choice ? e.g. <choice> <element name="abc" type="abcType" /> <element name="xyz" type="xyzType" /> </choice> |
|
From: Ashish G. <agu...@gm...> - 2013-01-23 21:34:53
|
Hi, I am trying to convert from JAXB elements to simple Xml. Most of them are converted but I am not sure about some of these. @XmlAnyElement(lax = true) protected List<Object> any; @XmlValue protected String value; @XmlAnyAttribute private Map<QName, String> moreInfo = new HashMap<QName, String>(); @XmlSchemaType(name = "dateTime") Any suggestions ? Thanks Ashish |
|
From: Niall G. - Y. <Nia...@yi...> - 2013-01-22 00:05:55
|
I will take a look at adding this to the existing DateTransform, my only reservation is backward compatibility may break in some cases. -----Original Message----- From: Adam Mackler [mailto:sim...@ma...] Sent: Tuesday, 22 January 2013 10:18 AM To: sim...@li... Subject: Re: [Simple-support] Transforming XML schema xs:dateTime type FWIW, this blows my mind. My impression from reading the W3C XML Schema specification Part 2, section 3.2.7[1] is that there is a standardized format for date-time values. Wouldn't that format be the obvious choice for serializing java.util.Date objects? As it is, W3C-schema based XML validators will reject Date values serialized by the Simple Framework. That I need to "write a Transformer" to get the Simple Framework to produce XML that complies with the W3C Schema specification brings several words to my mind, none of which is "simple." [1] http://www.w3.org/TR/xmlschema-2/#dateTime On 2011-08-02 09:44, Niall Gallagher <gallagher_niall@ya...> wrote: > You need to write a Transformer to handle this as an attribute. There are examples in the tutorial and in the test cases. > > --- On Mon, 1/8/11, Courtney, Phil <Philip_Courtney@...> wrote: > > From: Courtney, Phil <Philip_Courtney@...> > Subject: [Simple-support] Transforming XML schema xs:dateTime type > To: simple-support@... > Received: Monday, 1 August, 2011, 10:25 AM > > We have been using JAXB on workstations and servers to read and write XML documents. We are now trying to use the Simple Framework to read the same XML documents from an Android application (since JAXB is not supported on Android). In JAXB, a XML xs: dateTime type attribute is transformed with a XMLGregorianCalendar class. When I try to use the XMLGregorianCalendar class with the Simple Framework as shown below: @Attribute(required = true) protected XMLGregorianCalendar lastModified; I get the following error: Cannot use @org.simpleframework.xml.Attribute(empty=, name=, required=true) to represent protected javax.xml.datatype.XMLGregorianCalendar. How can I use the Simple Framework to work with a xs:dateTime attribute? Since this is one of the built-in types, it seems like it should be straightforward. I tried using GregorianCalendar, but that class could not parse the time part. Thanks,Phil > -- Adam Mackler ------------------------------------------------------------------------------ Master Visual Studio, SharePoint, SQL, ASP.NET, C# 2012, HTML5, CSS, MVC, Windows 8 Apps, JavaScript and much more. Keep your skills current with LearnDevNow - 3,200 step-by-step video tutorials by Microsoft MVPs and experts. SALE $99.99 this month only -- learn more at: http://p.sf.net/sfu/learnmore_122412 _______________________________________________ Simple-support mailing list Sim...@li... https://lists.sourceforge.net/lists/listinfo/simple-support |
|
From: Adam M. <sim...@ma...> - 2013-01-21 23:35:53
|
FWIW, this blows my mind. My impression from reading the W3C XML Schema specification Part 2, section 3.2.7[1] is that there is a standardized format for date-time values. Wouldn't that format be the obvious choice for serializing java.util.Date objects? As it is, W3C-schema based XML validators will reject Date values serialized by the Simple Framework. That I need to "write a Transformer" to get the Simple Framework to produce XML that complies with the W3C Schema specification brings several words to my mind, none of which is "simple." [1] http://www.w3.org/TR/xmlschema-2/#dateTime On 2011-08-02 09:44, Niall Gallagher <gallagher_niall@ya...> wrote: > You need to write a Transformer to handle this as an attribute. There are examples in the tutorial and in the test cases. > > --- On Mon, 1/8/11, Courtney, Phil <Philip_Courtney@...> wrote: > > From: Courtney, Phil <Philip_Courtney@...> > Subject: [Simple-support] Transforming XML schema xs:dateTime type > To: simple-support@... > Received: Monday, 1 August, 2011, 10:25 AM > > We have been using JAXB on workstations and servers to read and write XML documents. We are now trying to use the Simple Framework to read the same XML documents from an Android application (since JAXB is not supported on Android). In JAXB, a XML xs: dateTime type attribute is transformed with a XMLGregorianCalendar class. When I try to use the XMLGregorianCalendar class with the Simple Framework as shown below: @Attribute(required = true) protected XMLGregorianCalendar lastModified; I get the following error: Cannot use @org.simpleframework.xml.Attribute(empty=, name=, required=true) to represent protected javax.xml.datatype.XMLGregorianCalendar. How can I use the Simple Framework to work with a xs:dateTime attribute? Since this is one of the built-in types, it seems like it should be straightforward. I tried using GregorianCalendar, but that class could not parse the time part. Thanks,Phil > -- Adam Mackler |
|
From: Niall G. - Y. <Nia...@yi...> - 2013-01-21 22:44:04
|
This has more to do with the underlying StAX/DOM implementation. Make sure you reading in the UTF-8 charset. From: Алексей Киреев [mailto:_l...@in...] Sent: Tuesday, 22 January 2013 8:03 AM To: sim...@li... Subject: [Simple-support] Russian tags It is able to deserealize document with russian tags? I try it with no success in inner tags (with @Element(name="russiantag"), outer tags are recognized with @Root(name="russiantag") or @Element(...) or @ElementList(...) W/System.err(27616): org.simpleframework.xml.core.ValueRequiredException: Unable to satisfy @org.simpleframework.xml.Element(data=false, name=Адрес, required=true, type=class java.lang.String) on field 'clientAddress' public java.lang.String com.example.sxp.IBClient.clientAddress for class com.example.sxp.IBClient at line 6 If i replace russian tags with english - all works ok. |