simple-support Mailing List for Simple (Page 18)
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...> - 2012-05-08 09:30:42
|
To fix put in the @Path for the constructor also to fully qualify it. --- On Mon, 7/5/12, Simon Brodt <sim...@if...> wrote: From: Simon Brodt <sim...@if...> Subject: [Simple-support] BUG: Equal attribute names at different pathes seem to be confused To: sim...@li... Received: Monday, 7 May, 2012, 5:44 AM Dear all, It seems like there is a bug in the constructor checks. A exception "org.simpleframework.xml.core.ConstructorException: Parameter 'iri' does not have a match in class bugreports.simple_xml.Test1" Is thrown though there is definitely a match. For reproducing the bug, just execute the main method of the Test1.java class. Best Regards Simon -----Inline Attachment Follows----- ------------------------------------------------------------------------------ Live Security Virtual Conference Exclusive live event will cover all the ways today's security and threat landscape has changed and how IT managers can respond. Discussions will include endpoint security, mobile security and the latest in malware threats. http://www.accelacomm.com/jaw/sfrnl04242012/114/50122263/ -----Inline Attachment Follows----- _______________________________________________ Simple-support mailing list Sim...@li... https://lists.sourceforge.net/lists/listinfo/simple-support |
|
From: Simon B. <sim...@if...> - 2012-05-07 13:04:36
|
Dear all, It seems like there is a bug in the constructor checks. A exception "org.simpleframework.xml.core.ConstructorException: Parameter 'iri' does not have a match in class bugreports.simple_xml.Test1" Is thrown though there is definitely a match. For reproducing the bug, just execute the main method of the Test1.java class. Best Regards Simon |
|
From: Adam R. <ada...@gm...> - 2012-05-07 09:20:21
|
Hi Niall,
thanks for the quick answers. From what you tell me, it seems that turning
on the validation of the root element's name is quite complicated. I know
it's really not my place, but would you consider changes to make it
easier? I think the default way it works now (that the name of the root
element is ignored) is quite suprising and counter-intuitive, and I expect
that many users of your library will want to alter that behavior. It seems
that creating a mechanism to do it quickly and easily would be valuable.
The simplest way (from the user's point of view) to achieve that would be
to change the semantics of the name attribute of the @Root annotation when
it's used on the root class being deserialized (in other words, the one
whose Class object you pass as the first argument to read() - RootEl in my
examples). I think that would make it work in the most intuitive way.
However, it's just a suggestion - the decision is yours, of course :).
Take care,
Adam
On Sat, May 5, 2012 at 6:03 AM, Niall Gallagher
<gal...@ya...>wrote:
> You could do a number of things, for example you could extend the
> Persister and override the method taking the InputNode, here you could
> check the root node name. You could also use a Visitor, and check it there
> with the InputNode. Another way is a Strategy, but this is pretty much the
> same as a Visitor with a few more complications.
>
>
> --- On *Fri, 4/5/12, Adam Ruka <ada...@gm...>* wrote:
>
>
> From: Adam Ruka <ada...@gm...>
> Subject: Re: [Simple-support] ignored name attribute of Root annotation
> To: sim...@li...
> Received: Friday, 4 May, 2012, 1:18 PM
>
> Hi,
>
> that's reasonable, altough it doesn't solve my problem, which is: how to
> force the XML root element to have a specific name? In other words, what
> changes have to be made to the RootEl class to make that third test that I
> posted earlier fail?
>
>
> On Fri, May 4, 2012 at 4:15 PM, Niall Gallagher <gal...@ya...<http://mc/compose?to=...@ya...>
> > wrote:
>
> Hi,
>
> Yes this is true, this is an intentional feature. You need to be able to
> override the name of an entry within a list. This allows each element to
> override the name of the entry.
>
> Niall
>
> --- On *Fri, 4/5/12, Adam Ruka <ada...@gm...<http://mc/compose?to=...@gm...>
> >* wrote:
>
>
> From: Adam Ruka <ada...@gm...<http://mc/compose?to=...@gm...>
> >
> Subject: [Simple-support] ignored name attribute of Root annotation
> To: sim...@li...<http://mc/compose?to=...@li...>
> Received: Friday, 4 May, 2012, 1:26 AM
>
> Hello everybody,
>
> first of all, I want to say that Simple is the best XML library I've
> ever used. I absolutely love it. Having said that, I stumbled upon
> some weird behavior lately: the name attribute of the Root annotation
> seems to be ignored when deserializing XML to an object. Here is a
> small test case which illustrates the problem:
>
> import static org.junit.Assert.*;
>
> import org.junit.Test;
> import org.simpleframework.xml.Attribute;
> import org.simpleframework.xml.Root;
> import org.simpleframework.xml.Serializer;
> import org.simpleframework.xml.core.PersistenceException;
> import org.simpleframework.xml.core.Persister;
>
> public class BadRootNameTest {
> private static final Serializer persister = new Persister();
>
> @Root(name="root")
> public static class RootEl {
> @Attribute
> public String attr;
> }
>
> @Test
> public void testGoodRoot() throws Exception {
> // passes OK
> RootEl rootEl = persister.read(RootEl.class, "<root
> attr=\"xxx\"/>");
> assertNotNull(rootEl);
> assertEquals("xxx", rootEl.attr);
> }
>
> @Test(expected=PersistenceException.class)
> public void testBadAttr() throws Exception {
> // throws an exception, as is expected
> persister.read(RootEl.class, "<root xxx=\"yyyy\"/>");
> }
>
> @Test
> public void testBadRootName() throws Exception {
> // does NOT throw an exception!
> RootEl rootEl = persister.read(RootEl.class,
> "<xxxxxxxxxx attr=\"yyy\"/>");
> assertNotNull(rootEl);
> assertEquals("yyy", rootEl.attr);
> }
> }
>
> I believe the same thing happens with the ElementList annotation when
> inline is set to false. Is this a bug, or do you need to do something
> special for the name attribute to take effect? Thanks in advance for
> any help.
>
> Best wishes,
>
> Adam Ruka
>
>
> ------------------------------------------------------------------------------
> Live Security Virtual Conference
> Exclusive live event will cover all the ways today's security and
> threat landscape has changed and how IT managers can respond. Discussions
> will include endpoint security, mobile security and the latest in malware
> threats. http://www.accelacomm.com/jaw/sfrnl04242012/114/50122263/
> _______________________________________________
> Simple-support mailing list
> Sim...@li...<http://mc/compose?to=...@li...>
> https://lists.sourceforge.net/lists/listinfo/simple-support
>
>
>
> -----Inline Attachment Follows-----
>
>
>
> ------------------------------------------------------------------------------
> Live Security Virtual Conference
> Exclusive live event will cover all the ways today's security and
> threat landscape has changed and how IT managers can respond. Discussions
> will include endpoint security, mobile security and the latest in malware
> threats. http://www.accelacomm.com/jaw/sfrnl04242012/114/50122263/
>
> -----Inline Attachment Follows-----
>
>
> _______________________________________________
> Simple-support mailing list
> Sim...@li...<http://mc/compose?to=...@li...>
> https://lists.sourceforge.net/lists/listinfo/simple-support
>
>
|
|
From: Niall G. <gal...@ya...> - 2012-05-07 07:19:56
|
Cool, thanks for the feedback, ill make sure this is sorted out in the next release. --- On Sun, 6/5/12, Shevek <sh...@an...> wrote: From: Shevek <sh...@an...> Subject: Re: [Simple-support] RegistryStrategy causes NPE when Converter is used To: sim...@li... Received: Sunday, 6 May, 2012, 9:35 PM On Sun, 2012-05-06 at 20:24 -0700, Shevek wrote: > Test case is a bit tangled, but I can provide it if the explanation > below isn't sufficient: > > * Interface Value has a method getType() which returns the type of the > value. > > * However ArrayValue implements this to return the type of the element, > not the array type. See TreeStrategy.read() lines circa 105, where > 'actual', not 'expect' is passed to readArray(). > > * This causes RegistryStrategy's read() method to call lookup() with an > element type, and return a Converter when it is actually holding the > array node, not the element node. > > * This causes the Converter to fail, since it gets given the InputNode > for the array itself, not the InputNode for the array element, and so > the attributes expected are not present. > > Possible solutions: > > 1) Pass 'actual', not 'expect' to ArrayValue. This makes ArrayValue > satisfy the contract of Value, but may break things which rely on > ArrayValue being a special case. > > 2) During deserialization, at the point where RegistryStrategy calls > lookup(), make it ignore Value.getType(), since that is invalid, and > rely on the expected type if present. This may still have to use > Value.getType() during serialization... Changing read() to call lookup(type, null) fixes the bug. write() still calls lookup(type, value) S. ------------------------------------------------------------------------------ Live Security Virtual Conference Exclusive live event will cover all the ways today's security and threat landscape has changed and how IT managers can respond. Discussions will include endpoint security, mobile security and the latest in malware threats. http://www.accelacomm.com/jaw/sfrnl04242012/114/50122263/ _______________________________________________ Simple-support mailing list Sim...@li... https://lists.sourceforge.net/lists/listinfo/simple-support |
|
From: Shevek <sh...@an...> - 2012-05-07 04:35:36
|
On Sun, 2012-05-06 at 20:24 -0700, Shevek wrote: > Test case is a bit tangled, but I can provide it if the explanation > below isn't sufficient: > > * Interface Value has a method getType() which returns the type of the > value. > > * However ArrayValue implements this to return the type of the element, > not the array type. See TreeStrategy.read() lines circa 105, where > 'actual', not 'expect' is passed to readArray(). > > * This causes RegistryStrategy's read() method to call lookup() with an > element type, and return a Converter when it is actually holding the > array node, not the element node. > > * This causes the Converter to fail, since it gets given the InputNode > for the array itself, not the InputNode for the array element, and so > the attributes expected are not present. > > Possible solutions: > > 1) Pass 'actual', not 'expect' to ArrayValue. This makes ArrayValue > satisfy the contract of Value, but may break things which rely on > ArrayValue being a special case. > > 2) During deserialization, at the point where RegistryStrategy calls > lookup(), make it ignore Value.getType(), since that is invalid, and > rely on the expected type if present. This may still have to use > Value.getType() during serialization... Changing read() to call lookup(type, null) fixes the bug. write() still calls lookup(type, value) S. |
|
From: Shevek <sh...@an...> - 2012-05-07 03:57:06
|
Test case is a bit tangled, but I can provide it if the explanation below isn't sufficient: * Interface Value has a method getType() which returns the type of the value. * However ArrayValue implements this to return the type of the element, not the array type. See TreeStrategy.read() lines circa 105, where 'actual', not 'expect' is passed to readArray(). * This causes RegistryStrategy's read() method to call lookup() with an element type, and return a Converter when it is actually holding the array node, not the element node. * This causes the Converter to fail, since it gets given the InputNode for the array itself, not the InputNode for the array element, and so the attributes expected are not present. Possible solutions: 1) Pass 'actual', not 'expect' to ArrayValue. This makes ArrayValue satisfy the contract of Value, but may break things which rely on ArrayValue being a special case. 2) During deserialization, at the point where RegistryStrategy calls lookup(), make it ignore Value.getType(), since that is invalid, and rely on the expected type if present. This may still have to use Value.getType() during serialization... 3) ... ? Any guidance? S. |
|
From: Niall G. <gal...@ya...> - 2012-05-05 04:04:54
|
I don't think this is a threading issue, are you using the @Path annotation anywhere, if so what is the syntax of it? --- On Fri, 4/5/12, Eli Konky <eli...@gm...> wrote: From: Eli Konky <eli...@gm...> Subject: [Simple-support] NullPointerException To: sim...@li... Received: Friday, 4 May, 2012, 1:43 PM Hi all, I'm running on android. I have a multi threaded executor that sometimes crashes with the below error.All my threads share the same strategy and persister: Strategy strategy = new AnnotationStrategy(); Persister persister = new Persister(strategy);When I recreate those two objects on every request the problem goes away, but I thought the persister is thread safe. ThanksEli --- start stack tracks -- 05-03 18:10:39.963: E/TaskManager(12862): java.lang.NullPointerException 05-03 18:10:39.963: E/TaskManager(12862): at java.util.LinkedHashMap.postRemove(LinkedHashMap.java:291) 05-03 18:10:39.963: E/TaskManager(12862): at java.util.HashMap.remove(HashMap.java:637) 05-03 18:10:39.963: E/TaskManager(12862): at java.util.LinkedHashMap.addNewEntry(LinkedHashMap.java:186) 05-03 18:10:39.963: E/TaskManager(12862): at java.util.HashMap.put(HashMap.java:411) 05-03 18:10:39.963: E/TaskManager(12862): at org.simpleframework.xml.core.PathParser.getElement(PathParser.java:262) 05-03 18:10:39.963: E/TaskManager(12862): at org.simpleframework.xml.core.ModelSection.getPath(ModelSection.java:121) 05-03 18:10:39.963: E/TaskManager(12862): at org.simpleframework.xml.core.Composite.readElement(Composite.java:577) 05-03 18:10:39.963: E/TaskManager(12862): at org.simpleframework.xml.core.Composite.readElements(Composite.java:506) 05-03 18:10:39.963: E/TaskManager(12862): at org.simpleframework.xml.core.Composite.readSection(Composite.java:388) 05-03 18:10:39.963: E/TaskManager(12862): at org.simpleframework.xml.core.Composite.read(Composite.java:367) 05-03 18:10:39.963: E/TaskManager(12862): at org.simpleframework.xml.core.Composite.readDefault(Composite.java:262) 05-03 18:10:39.963: E/TaskManager(12862): at org.simpleframework.xml.core.Composite.read(Composite.java:232) 05-03 18:10:39.963: E/TaskManager(12862): at org.simpleframework.xml.core.Composite.read(Composite.java:202) 05-03 18:10:39.963: E/TaskManager(12862): at org.simpleframework.xml.core.Composite.read(Composite.java:150) 05-03 18:10:39.963: E/TaskManager(12862): at org.simpleframework.xml.core.Traverser.read(Traverser.java:92) 05-03 18:10:39.963: E/TaskManager(12862): at org.simpleframework.xml.core.CompositeList.populate(CompositeList.java:175) 05-03 18:10:39.963: E/TaskManager(12862): at org.simpleframework.xml.core.CompositeList.read(CompositeList.java:120) 05-03 18:10:39.963: E/TaskManager(12862): at org.simpleframework.xml.core.Composite.readVariable(Composite.java:688) 05-03 18:10:39.963: E/TaskManager(12862): at org.simpleframework.xml.core.Composite.readInstance(Composite.java:635) 05-03 18:10:39.963: E/TaskManager(12862): at org.simpleframework.xml.core.Composite.readUnion(Composite.java:610) 05-03 18:10:39.963: E/TaskManager(12862): at org.simpleframework.xml.core.Composite.readElement(Composite.java:593) 05-03 18:10:39.963: E/TaskManager(12862): at org.simpleframework.xml.core.Composite.readElements(Composite.java:506) 05-03 18:10:39.963: E/TaskManager(12862): at org.simpleframework.xml.core.Composite.readSection(Composite.java:388) 05-03 18:10:39.963: E/TaskManager(12862): at org.simpleframework.xml.core.Composite.read(Composite.java:367) 05-03 18:10:39.963: E/TaskManager(12862): at org.simpleframework.xml.core.Composite.read(Composite.java:174) 05-03 18:10:39.963: E/TaskManager(12862): at org.simpleframework.xml.core.Traverser.read(Traverser.java:120) 05-03 18:10:39.963: E/TaskManager(12862): at org.simpleframework.xml.core.Persister.read(Persister.java:879) 05-03 18:10:39.963: E/TaskManager(12862): at org.simpleframework.xml.core.Persister.read(Persister.java:859) 05-03 18:10:39.963: E/TaskManager(12862): at org.simpleframework.xml.core.Persister.read(Persister.java:836) 05-03 18:10:39.963: E/TaskManager(12862): at org.simpleframework.xml.core.Persister.read(Persister.java:793) -----Inline Attachment Follows----- ------------------------------------------------------------------------------ Live Security Virtual Conference Exclusive live event will cover all the ways today's security and threat landscape has changed and how IT managers can respond. Discussions will include endpoint security, mobile security and the latest in malware threats. http://www.accelacomm.com/jaw/sfrnl04242012/114/50122263/ -----Inline Attachment Follows----- _______________________________________________ Simple-support mailing list Sim...@li... https://lists.sourceforge.net/lists/listinfo/simple-support |
|
From: Niall G. <gal...@ya...> - 2012-05-05 04:03:09
|
You could do a number of things, for example you could extend the Persister and override the method taking the InputNode, here you could check the root node name. You could also use a Visitor, and check it there with the InputNode. Another way is a Strategy, but this is pretty much the same as a Visitor with a few more complications.
--- On Fri, 4/5/12, Adam Ruka <ada...@gm...> wrote:
From: Adam Ruka <ada...@gm...>
Subject: Re: [Simple-support] ignored name attribute of Root annotation
To: sim...@li...
Received: Friday, 4 May, 2012, 1:18 PM
Hi,
that's reasonable, altough it doesn't solve my problem, which is: how to force the XML root element to have a specific name? In other words, what changes have to be made to the RootEl class to make that third test that I posted earlier fail?
On Fri, May 4, 2012 at 4:15 PM, Niall Gallagher <gal...@ya...> wrote:
Hi,
Yes this is true, this is an intentional feature. You need to be able to override the name of an entry within a list. This allows each element to override the name of the entry.
Niall
--- On Fri, 4/5/12, Adam Ruka <ada...@gm...> wrote:
From: Adam Ruka <ada...@gm...>
Subject: [Simple-support] ignored name attribute of Root annotation
To: sim...@li...
Received: Friday, 4 May, 2012, 1:26 AM
Hello everybody,
first of all, I want to say that Simple is the best XML library I've
ever used. I absolutely love it. Having said that, I stumbled upon
some weird behavior lately: the name attribute of
the Root annotation
seems to be ignored when deserializing XML to an object. Here is a
small test case which illustrates the problem:
import static org.junit.Assert.*;
import org.junit.Test;
import org.simpleframework.xml.Attribute;
import org.simpleframework.xml.Root;
import org.simpleframework.xml.Serializer;
import org.simpleframework.xml.core.PersistenceException;
import org.simpleframework.xml.core.Persister;
public class BadRootNameTest {
private static final Serializer persister = new Persister();
@Root(name="root")
public static class RootEl {
@Attribute
public String attr;
}
@Test
public void
testGoodRoot() throws Exception {
// passes OK
RootEl rootEl = persister.read(RootEl.class, "<root
attr=\"xxx\"/>");
assertNotNull(rootEl);
assertEquals("xxx", rootEl.attr);
}
@Test(expected=PersistenceException.class)
public void testBadAttr() throws Exception {
// throws an exception, as is expected
persister.read(RootEl.class, "<root xxx=\"yyyy\"/>");
}
@Test
public void testBadRootName() throws
Exception {
// does NOT throw an exception!
RootEl rootEl = persister.read(RootEl.class,
"<xxxxxxxxxx attr=\"yyy\"/>");
assertNotNull(rootEl);
assertEquals("yyy", rootEl.attr);
}
}
I believe the same thing happens with the ElementList annotation when
inline is set to false. Is this a bug, or do you need to do something
special for the name attribute to take effect? Thanks in advance for
any help.
Best wishes,
Adam Ruka
------------------------------------------------------------------------------
Live Security Virtual Conference
Exclusive live event will cover all the ways today's security and
threat landscape has changed and how IT
managers can respond. Discussions
will include endpoint security, mobile security and the latest in malware
threats. http://www.accelacomm.com/jaw/sfrnl04242012/114/50122263/
_______________________________________________
Simple-support mailing list
Sim...@li...
https://lists.sourceforge.net/lists/listinfo/simple-support
-----Inline Attachment Follows-----
------------------------------------------------------------------------------
Live Security Virtual Conference
Exclusive live event will cover all the ways today's security and
threat landscape has changed and how IT managers can respond. Discussions
will include endpoint security, mobile security and the latest in malware
threats. http://www.accelacomm.com/jaw/sfrnl04242012/114/50122263/
-----Inline Attachment Follows-----
_______________________________________________
Simple-support mailing list
Sim...@li...
https://lists.sourceforge.net/lists/listinfo/simple-support
|
|
From: Eli K. <eli...@gm...> - 2012-05-04 20:43:38
|
Hi all, I'm running on android. I have a multi threaded executor that sometimes crashes with the below error. All my threads share the same strategy and persister: Strategy strategy = new AnnotationStrategy(); Persister persister = new Persister(strategy); When I recreate those two objects on every request the problem goes away, but I thought the persister is thread safe. Thanks Eli --- start stack tracks -- 05-03 18:10:39.963: E/TaskManager(12862): java.lang.NullPointerException 05-03 18:10:39.963: E/TaskManager(12862): at java.util.LinkedHashMap.postRemove(LinkedHashMap.java:291) 05-03 18:10:39.963: E/TaskManager(12862): at java.util.HashMap.remove(HashMap.java:637) 05-03 18:10:39.963: E/TaskManager(12862): at java.util.LinkedHashMap.addNewEntry(LinkedHashMap.java:186) 05-03 18:10:39.963: E/TaskManager(12862): at java.util.HashMap.put(HashMap.java:411) 05-03 18:10:39.963: E/TaskManager(12862): at org.simpleframework.xml.core.PathParser.getElement(PathParser.java:262) 05-03 18:10:39.963: E/TaskManager(12862): at org.simpleframework.xml.core.ModelSection.getPath(ModelSection.java:121) 05-03 18:10:39.963: E/TaskManager(12862): at org.simpleframework.xml.core.Composite.readElement(Composite.java:577) 05-03 18:10:39.963: E/TaskManager(12862): at org.simpleframework.xml.core.Composite.readElements(Composite.java:506) 05-03 18:10:39.963: E/TaskManager(12862): at org.simpleframework.xml.core.Composite.readSection(Composite.java:388) 05-03 18:10:39.963: E/TaskManager(12862): at org.simpleframework.xml.core.Composite.read(Composite.java:367) 05-03 18:10:39.963: E/TaskManager(12862): at org.simpleframework.xml.core.Composite.readDefault(Composite.java:262) 05-03 18:10:39.963: E/TaskManager(12862): at org.simpleframework.xml.core.Composite.read(Composite.java:232) 05-03 18:10:39.963: E/TaskManager(12862): at org.simpleframework.xml.core.Composite.read(Composite.java:202) 05-03 18:10:39.963: E/TaskManager(12862): at org.simpleframework.xml.core.Composite.read(Composite.java:150) 05-03 18:10:39.963: E/TaskManager(12862): at org.simpleframework.xml.core.Traverser.read(Traverser.java:92) 05-03 18:10:39.963: E/TaskManager(12862): at org.simpleframework.xml.core.CompositeList.populate(CompositeList.java:175) 05-03 18:10:39.963: E/TaskManager(12862): at org.simpleframework.xml.core.CompositeList.read(CompositeList.java:120) 05-03 18:10:39.963: E/TaskManager(12862): at org.simpleframework.xml.core.Composite.readVariable(Composite.java:688) 05-03 18:10:39.963: E/TaskManager(12862): at org.simpleframework.xml.core.Composite.readInstance(Composite.java:635) 05-03 18:10:39.963: E/TaskManager(12862): at org.simpleframework.xml.core.Composite.readUnion(Composite.java:610) 05-03 18:10:39.963: E/TaskManager(12862): at org.simpleframework.xml.core.Composite.readElement(Composite.java:593) 05-03 18:10:39.963: E/TaskManager(12862): at org.simpleframework.xml.core.Composite.readElements(Composite.java:506) 05-03 18:10:39.963: E/TaskManager(12862): at org.simpleframework.xml.core.Composite.readSection(Composite.java:388) 05-03 18:10:39.963: E/TaskManager(12862): at org.simpleframework.xml.core.Composite.read(Composite.java:367) 05-03 18:10:39.963: E/TaskManager(12862): at org.simpleframework.xml.core.Composite.read(Composite.java:174) 05-03 18:10:39.963: E/TaskManager(12862): at org.simpleframework.xml.core.Traverser.read(Traverser.java:120) 05-03 18:10:39.963: E/TaskManager(12862): at org.simpleframework.xml.core.Persister.read(Persister.java:879) 05-03 18:10:39.963: E/TaskManager(12862): at org.simpleframework.xml.core.Persister.read(Persister.java:859) 05-03 18:10:39.963: E/TaskManager(12862): at org.simpleframework.xml.core.Persister.read(Persister.java:836) 05-03 18:10:39.963: E/TaskManager(12862): at org.simpleframework.xml.core.Persister.read(Persister.java:793) |
|
From: Adam R. <ada...@gm...> - 2012-05-04 20:18:38
|
Hi,
that's reasonable, altough it doesn't solve my problem, which is: how to
force the XML root element to have a specific name? In other words, what
changes have to be made to the RootEl class to make that third test that I
posted earlier fail?
On Fri, May 4, 2012 at 4:15 PM, Niall Gallagher
<gal...@ya...>wrote:
> Hi,
>
> Yes this is true, this is an intentional feature. You need to be able to
> override the name of an entry within a list. This allows each element to
> override the name of the entry.
>
> Niall
>
> --- On *Fri, 4/5/12, Adam Ruka <ada...@gm...>* wrote:
>
>
> From: Adam Ruka <ada...@gm...>
> Subject: [Simple-support] ignored name attribute of Root annotation
> To: sim...@li...
> Received: Friday, 4 May, 2012, 1:26 AM
>
> Hello everybody,
>
> first of all, I want to say that Simple is the best XML library I've
> ever used. I absolutely love it. Having said that, I stumbled upon
> some weird behavior lately: the name attribute of the Root annotation
> seems to be ignored when deserializing XML to an object. Here is a
> small test case which illustrates the problem:
>
> import static org.junit.Assert.*;
>
> import org.junit.Test;
> import org.simpleframework.xml.Attribute;
> import org.simpleframework.xml.Root;
> import org.simpleframework.xml.Serializer;
> import org.simpleframework.xml.core.PersistenceException;
> import org.simpleframework.xml.core.Persister;
>
> public class BadRootNameTest {
> private static final Serializer persister = new Persister();
>
> @Root(name="root")
> public static class RootEl {
> @Attribute
> public String attr;
> }
>
> @Test
> public void testGoodRoot() throws Exception {
> // passes OK
> RootEl rootEl = persister.read(RootEl.class, "<root
> attr=\"xxx\"/>");
> assertNotNull(rootEl);
> assertEquals("xxx", rootEl.attr);
> }
>
> @Test(expected=PersistenceException.class)
> public void testBadAttr() throws Exception {
> // throws an exception, as is expected
> persister.read(RootEl.class, "<root xxx=\"yyyy\"/>");
> }
>
> @Test
> public void testBadRootName() throws Exception {
> // does NOT throw an exception!
> RootEl rootEl = persister.read(RootEl.class,
> "<xxxxxxxxxx attr=\"yyy\"/>");
> assertNotNull(rootEl);
> assertEquals("yyy", rootEl.attr);
> }
> }
>
> I believe the same thing happens with the ElementList annotation when
> inline is set to false. Is this a bug, or do you need to do something
> special for the name attribute to take effect? Thanks in advance for
> any help.
>
> Best wishes,
>
> Adam Ruka
>
>
> ------------------------------------------------------------------------------
> Live Security Virtual Conference
> Exclusive live event will cover all the ways today's security and
> threat landscape has changed and how IT managers can respond. Discussions
> will include endpoint security, mobile security and the latest in malware
> threats. http://www.accelacomm.com/jaw/sfrnl04242012/114/50122263/
> _______________________________________________
> Simple-support mailing list
> Sim...@li...<http://mc/compose?to=...@li...>
> https://lists.sourceforge.net/lists/listinfo/simple-support
>
>
|
|
From: Niall G. <gal...@ya...> - 2012-05-04 14:15:19
|
Hi,
Yes this is true, this is an intentional feature. You need to be able to override the name of an entry within a list. This allows each element to override the name of the entry.
Niall
--- On Fri, 4/5/12, Adam Ruka <ada...@gm...> wrote:
From: Adam Ruka <ada...@gm...>
Subject: [Simple-support] ignored name attribute of Root annotation
To: sim...@li...
Received: Friday, 4 May, 2012, 1:26 AM
Hello everybody,
first of all, I want to say that Simple is the best XML library I've
ever used. I absolutely love it. Having said that, I stumbled upon
some weird behavior lately: the name attribute of the Root annotation
seems to be ignored when deserializing XML to an object. Here is a
small test case which illustrates the problem:
import static org.junit.Assert.*;
import org.junit.Test;
import org.simpleframework.xml.Attribute;
import org.simpleframework.xml.Root;
import org.simpleframework.xml.Serializer;
import org.simpleframework.xml.core.PersistenceException;
import org.simpleframework.xml.core.Persister;
public class BadRootNameTest {
private static final Serializer persister = new Persister();
@Root(name="root")
public static class RootEl {
@Attribute
public String attr;
}
@Test
public void testGoodRoot() throws Exception {
// passes OK
RootEl rootEl = persister.read(RootEl.class, "<root
attr=\"xxx\"/>");
assertNotNull(rootEl);
assertEquals("xxx", rootEl.attr);
}
@Test(expected=PersistenceException.class)
public void testBadAttr() throws Exception {
// throws an exception, as is expected
persister.read(RootEl.class, "<root xxx=\"yyyy\"/>");
}
@Test
public void testBadRootName() throws Exception {
// does NOT throw an exception!
RootEl rootEl = persister.read(RootEl.class,
"<xxxxxxxxxx attr=\"yyy\"/>");
assertNotNull(rootEl);
assertEquals("yyy", rootEl.attr);
}
}
I believe the same thing happens with the ElementList annotation when
inline is set to false. Is this a bug, or do you need to do something
special for the name attribute to take effect? Thanks in advance for
any help.
Best wishes,
Adam Ruka
------------------------------------------------------------------------------
Live Security Virtual Conference
Exclusive live event will cover all the ways today's security and
threat landscape has changed and how IT managers can respond. Discussions
will include endpoint security, mobile security and the latest in malware
threats. http://www.accelacomm.com/jaw/sfrnl04242012/114/50122263/
_______________________________________________
Simple-support mailing list
Sim...@li...
https://lists.sourceforge.net/lists/listinfo/simple-support
|
|
From: Adam R. <ada...@gm...> - 2012-05-04 08:27:05
|
Hello everybody,
first of all, I want to say that Simple is the best XML library I've
ever used. I absolutely love it. Having said that, I stumbled upon
some weird behavior lately: the name attribute of the Root annotation
seems to be ignored when deserializing XML to an object. Here is a
small test case which illustrates the problem:
import static org.junit.Assert.*;
import org.junit.Test;
import org.simpleframework.xml.Attribute;
import org.simpleframework.xml.Root;
import org.simpleframework.xml.Serializer;
import org.simpleframework.xml.core.PersistenceException;
import org.simpleframework.xml.core.Persister;
public class BadRootNameTest {
private static final Serializer persister = new Persister();
@Root(name="root")
public static class RootEl {
@Attribute
public String attr;
}
@Test
public void testGoodRoot() throws Exception {
// passes OK
RootEl rootEl = persister.read(RootEl.class, "<root
attr=\"xxx\"/>");
assertNotNull(rootEl);
assertEquals("xxx", rootEl.attr);
}
@Test(expected=PersistenceException.class)
public void testBadAttr() throws Exception {
// throws an exception, as is expected
persister.read(RootEl.class, "<root xxx=\"yyyy\"/>");
}
@Test
public void testBadRootName() throws Exception {
// does NOT throw an exception!
RootEl rootEl = persister.read(RootEl.class,
"<xxxxxxxxxx attr=\"yyy\"/>");
assertNotNull(rootEl);
assertEquals("yyy", rootEl.attr);
}
}
I believe the same thing happens with the ElementList annotation when
inline is set to false. Is this a bug, or do you need to do something
special for the name attribute to take effect? Thanks in advance for
any help.
Best wishes,
Adam Ruka
|
|
From: Hans <fis...@ya...> - 2012-05-03 20:57:55
|
Hi,
> I think this is down the the underlying parser. Simple does not parse
> the XML. Have you tried to use<![CDATA[ ]> blocks, use
> @Element(data=true).
>
yes i tried. The serialized string contains the \r in the CDATA block.
But after deserialisation the \r is still replaced by a \n.
I tried the same with java.beans.XMLEncoder/XMLDecoder.
After serializing the string contains instead of \r and
after deserializing it the string of interest contains \r !
See example code below.
So i tried to do the same with the previous simpleXML example.
But after deserializing the xml.getContent() string contains still the
character reference and not a \r
Any way to configure simpleXML ot the used parser to preserve the \r ?
package carriage_return;
import java.beans.XMLDecoder;
import java.beans.XMLEncoder;
import java.io.ByteArrayInputStream;
import java.io.ByteArrayOutputStream;
public class CarriageReturn2 {
public static class Xml {
private String content;
public String getContent() {
return content;
}
public void setContent(String content) {
this.content = content;
}
}
public static void main(String[] args) throws Exception {
Xml xml = new Xml();
xml.setContent("Hello\rSimpleXML");
ByteArrayOutputStream baos = write(xml);
System.out.println(baos.toString());
xml = read(new ByteArrayInputStream(baos.toByteArray()));
System.out.println(xml.getContent().contains("\r"));
}
public static ByteArrayOutputStream write(Xml xml) throws Exception {
ByteArrayOutputStream baos = new ByteArrayOutputStream();
XMLEncoder encoder = new XMLEncoder(baos);
encoder.writeObject(xml);
encoder.close();
return baos;
}
public static Xml read(ByteArrayInputStream bais) throws Exception {
XMLDecoder decoder = new XMLDecoder(bais);
Xml o = (Xml) decoder.readObject();
decoder.close();
return o;
}
}
|
|
From: Niall G. <gal...@ya...> - 2012-05-03 08:50:41
|
I think this is down the the underlying parser. Simple does not parse the XML. Have you tried to use <![CDATA[ ]> blocks, use @Element(data=true).
--- On Wed, 2/5/12, Hans <fis...@ya...> wrote:
From: Hans <fis...@ya...>
Subject: [Simple-support] carriage return
To: sim...@li...
Received: Wednesday, 2 May, 2012, 11:26 PM
Hi,
The following example serializes a simple class
with one String property. This property contains
a carriage return ("\r").
After serializing the class to a String the carriage
return is preserved in the String.
After deserializing the String back to the class,
the carriage return is replaced by a line feed!
This behaviour surprised me, but after googling
around, this seems to be the normal behaviour.
So my question is what is best practice to
preserve the carriage return?
Setting the data attribute inside the annotation
of the element is not enough, the carriage
return is still replaced by a line feed.
package carriage_return;
import java.io.StringWriter;
import org.simpleframework.xml.Element;
import org.simpleframework.xml.Root;
import org.simpleframework.xml.Serializer;
import org.simpleframework.xml.core.Persister;
public class CarriageReturn {
@Root
public static class Xml {
@Element
private String content;
public Xml() {
}
public Xml(String content) {
this.content = content;
}
public String getContent() {
return content;
}
}
public static void main(String[] args) throws Exception {
Xml xml = new Xml("Hello\rSimpleXML");
Serializer serializer = new Persister();
StringWriter stringWriter = new StringWriter();
serializer.write(xml,stringWriter);
String serialzedXml = stringWriter.toString();
System.out.println(serialzedXml.contains("\r"));
xml = serializer.read(Xml.class,serialzedXml);
System.out.println(xml.getContent().contains("\r"));
}
}
------------------------------------------------------------------------------
Live Security Virtual Conference
Exclusive live event will cover all the ways today's security and
threat landscape has changed and how IT managers can respond. Discussions
will include endpoint security, mobile security and the latest in malware
threats. http://www.accelacomm.com/jaw/sfrnl04242012/114/50122263/
_______________________________________________
Simple-support mailing list
Sim...@li...
https://lists.sourceforge.net/lists/listinfo/simple-support
|
|
From: Hans <fis...@ya...> - 2012-05-03 06:26:22
|
Hi,
The following example serializes a simple class
with one String property. This property contains
a carriage return ("\r").
After serializing the class to a String the carriage
return is preserved in the String.
After deserializing the String back to the class,
the carriage return is replaced by a line feed!
This behaviour surprised me, but after googling
around, this seems to be the normal behaviour.
So my question is what is best practice to
preserve the carriage return?
Setting the data attribute inside the annotation
of the element is not enough, the carriage
return is still replaced by a line feed.
package carriage_return;
import java.io.StringWriter;
import org.simpleframework.xml.Element;
import org.simpleframework.xml.Root;
import org.simpleframework.xml.Serializer;
import org.simpleframework.xml.core.Persister;
public class CarriageReturn {
@Root
public static class Xml {
@Element
private String content;
public Xml() {
}
public Xml(String content) {
this.content = content;
}
public String getContent() {
return content;
}
}
public static void main(String[] args) throws Exception {
Xml xml = new Xml("Hello\rSimpleXML");
Serializer serializer = new Persister();
StringWriter stringWriter = new StringWriter();
serializer.write(xml,stringWriter);
String serialzedXml = stringWriter.toString();
System.out.println(serialzedXml.contains("\r"));
xml = serializer.read(Xml.class,serialzedXml);
System.out.println(xml.getContent().contains("\r"));
}
}
|
|
From: Niall G. <gal...@ya...> - 2012-05-01 08:49:22
|
Write a DateTransform that implements Transform, then add this to a Matcher like the RegistryMatcher and pass this to the Persister instance. --- On Mon, 30/4/12, Shay Hazan <sha...@to...> wrote: From: Shay Hazan <sha...@to...> Subject: [Simple-support] Choose date format To: sim...@li... Received: Monday, 30 April, 2012, 11:36 PM Hi, I have class with java.util.Date member. How I can control the format of the Date instead of using the default format ? Shay -----Inline Attachment Follows----- ------------------------------------------------------------------------------ Live Security Virtual Conference Exclusive live event will cover all the ways today's security and threat landscape has changed and how IT managers can respond. Discussions will include endpoint security, mobile security and the latest in malware threats. http://www.accelacomm.com/jaw/sfrnl04242012/114/50122263/ -----Inline Attachment Follows----- _______________________________________________ Simple-support mailing list Sim...@li... https://lists.sourceforge.net/lists/listinfo/simple-support |
|
From: Shay H. <sha...@to...> - 2012-05-01 07:01:40
|
Hi, I have class with java.util.Date member. How I can control the format of the Date instead of using the default format ? Shay |
|
From: Niall G. <gal...@ya...> - 2012-04-30 09:19:58
|
XPath support is limited so you can't actually do this. There are a number of ways to do this, you can use a Map with
@ElementMap(key="att", inline=true)Map<String, String> atts;
Here you just do atts.get("1");
You can also use a Strategy and collect every attribute in the session Map that is passed to the Strategy instance.
Then do the following with the @Commit attribute.
@Commitpublic void commit(Map session) { att1 = session.get("my.key.for.att1");}
See the documentation.
Niall
--- On Sun, 29/4/12, Shay Hazan <sha...@to...> wrote:
From: Shay Hazan <sha...@to...>
Subject: [Simple-support] Get element value with specific attribute value
To: sim...@li...
Received: Sunday, 29 April, 2012, 3:13 AM
Hi,
I have the following xml:
<a>
<b att1="1">bbbb</b>
<b att1="2">cccc</b>
</a>
How can I get the element "b" value with the attribute value "1" (bbbb).
I tried to configure the class "A" with the member "B" as below, but it doesn't work.
public class A
{
@Element(name="B")
@Path("[@att1=\"1\"]")
private String B;
}
Any suggestions ?
10x,
Shay
-----Inline Attachment Follows-----
------------------------------------------------------------------------------
Live Security Virtual Conference
Exclusive live event will cover all the ways today's security and
threat landscape has changed and how IT managers can respond. Discussions
will include endpoint security, mobile security and the latest in malware
threats. http://www.accelacomm.com/jaw/sfrnl04242012/114/50122263/
-----Inline Attachment Follows-----
_______________________________________________
Simple-support mailing list
Sim...@li...
https://lists.sourceforge.net/lists/listinfo/simple-support
|
|
From: Shay H. <sha...@to...> - 2012-04-29 10:13:56
|
Hi,
I have the following xml:
<a>
<b att1="1">bbbb</b>
<b att1="2">cccc</b>
</a>
How can I get the element "b" value with the attribute value "1" (bbbb).
I tried to configure the class "A" with the member "B" as below, but it
doesn't work.
public class A
{
@Element(name="B")
@Path("[@att1=\"1\"]")
private String B;
}
Any suggestions ?
10x,
Shay
|
|
From: Niall G. <gal...@ya...> - 2012-04-28 01:40:35
|
You can use a Converter to manipulate the XML directly, to convert attributes take a look at Transform.
--- On Fri, 27/4/12, Bernhard Groll <ber...@tu...> wrote:
From: Bernhard Groll <ber...@tu...>
Subject: Re: [Simple-support] Serialization of nested lists, arrays
To: "Niall Gallagher" <gal...@ya...>
Cc: "sim...@li..." <sim...@li...>
Received: Friday, 27 April, 2012, 6:40 AM
Hi Niall,
you wrote (2012-04-26T15:18:13-0700):
> You can create an object that contains a list and make the list
> inline like so. @ElementListList<Blah>list;
> class Blah { @ElementList(inline=true) List<BigDecimal> inline;}
Thanks for the idea. But while this would work for the XML output, the
necessary wrapper class (Blah) would be bad design on the Java side.
On a related topic, is there a way to make text lists like the default
serializations of arrays whitespace-separated instead of
comma-separated? Looking at XML schema descriptions the former seems to
be the norm.
Best regards,
Bernhard
|
|
From: Bernhard G. <ber...@tu...> - 2012-04-27 13:41:07
|
Hi Niall,
you wrote (2012-04-26T15:18:13-0700):
> You can create an object that contains a list and make the list
> inline like so. @ElementListList<Blah>list;
> class Blah { @ElementList(inline=true) List<BigDecimal> inline;}
Thanks for the idea. But while this would work for the XML output, the
necessary wrapper class (Blah) would be bad design on the Java side.
On a related topic, is there a way to make text lists like the default
serializations of arrays whitespace-separated instead of
comma-separated? Looking at XML schema descriptions the former seems to
be the norm.
Best regards,
Bernhard
|
|
From: Niall G. <gal...@ya...> - 2012-04-26 22:18:20
|
You can create an object that contains a list and make the list inline like so.
@ElementListList<Blah>list;
class Blah { @ElementList(inline=true) List<BigDecimal> inline;}
--- On Thu, 26/4/12, Bernhard Groll <ber...@tu...> wrote:
From: Bernhard Groll <ber...@tu...>
Subject: [Simple-support] Serialization of nested lists, arrays
To: "sim...@li..." <sim...@li...>
Received: Thursday, 26 April, 2012, 8:10 AM
Hello everybody,
I have a problem with serializing lists containing arrays, and I hope
that one of you can help me.
I have the following code:
@ElementList(entry="reading")
private List<BigDecimal[]> readings;
This is serialized as
<readings>
<reading length="2">42.5, 23.9</reading>
<reading length="2">5.7, 8.3</reading>
</readings>
But what I want is something like this (I don’t actually need the
length attribute):
<readings>
<reading length="2">
<value>42.5</value>
<value>23.9</value>
</reading>
<reading length="2">
<value>5.7</value>
<value>8.3</value>
</reading>
</readings>
I know that I can annotate a single array to get the inner
representation I want.
@ElementArray(entry = "value")
private BigDecimal[] reading;
<reading length="2">
<value>42.5</value>
<value>23.9</value>
</reading>
What I can’t figure out is how to combine these list and array
annotations or otherwise get the desired result.
I’d appreciate any advice.
Best regards,
Bernhard
------------------------------------------------------------------------------
Live Security Virtual Conference
Exclusive live event will cover all the ways today's security and
threat landscape has changed and how IT managers can respond. Discussions
will include endpoint security, mobile security and the latest in malware
threats. http://www.accelacomm.com/jaw/sfrnl04242012/114/50122263/
_______________________________________________
Simple-support mailing list
Sim...@li...
https://lists.sourceforge.net/lists/listinfo/simple-support
|
|
From: Bernhard G. <ber...@tu...> - 2012-04-26 16:00:13
|
Hello everybody,
I have a problem with serializing lists containing arrays, and I hope
that one of you can help me.
I have the following code:
@ElementList(entry="reading")
private List<BigDecimal[]> readings;
This is serialized as
<readings>
<reading length="2">42.5, 23.9</reading>
<reading length="2">5.7, 8.3</reading>
</readings>
But what I want is something like this (I don’t actually need the
length attribute):
<readings>
<reading length="2">
<value>42.5</value>
<value>23.9</value>
</reading>
<reading length="2">
<value>5.7</value>
<value>8.3</value>
</reading>
</readings>
I know that I can annotate a single array to get the inner
representation I want.
@ElementArray(entry = "value")
private BigDecimal[] reading;
<reading length="2">
<value>42.5</value>
<value>23.9</value>
</reading>
What I can’t figure out is how to combine these list and array
annotations or otherwise get the desired result.
I’d appreciate any advice.
Best regards,
Bernhard
|
|
From: Niall G. <gal...@ya...> - 2012-04-23 13:04:07
|
Use a Converter for the parent element, this should work. --- On Mon, 23/4/12, Fabrizio Lippolis <Fab...@au...> wrote: From: Fabrizio Lippolis <Fab...@au...> Subject: [Simple-support] how to get unknown list of attributes in a tag To: "sim...@li..." <sim...@li...> Received: Monday, 23 April, 2012, 3:11 AM Hi list, I am successfully using SimpleXML to serialize and deserialize some XML data in an Android application. Until now the XML data has always been known but now I need to read a list of attributes in a tag which I don't know in advance. Any suggestion on how to do this? Even reading the raw string containing the attributes without mapping to a class would be good. Thank you for suggestions. Fabrizio ----------------------------------------------------------------------- Fabrizio Lippolis phone +39.080.56.92.291 e-mail fab...@au... ----------------------------------------------------------------------- Auriga SpA - Strada Vassallo, 1 - 70125 Bari - IT Phone +39.080.56.92.111 - Fax +39.080.56.92.112 www.aurigaspa.com – in...@au... ----------------------------------------------------------------------- Ai sensi del D.Lgs. 196/2003 si precisa che le informazioni contenute in questo messaggio sono riservate ed a uso esclusivo del destinatario. Qualora il presente messaggio Le fosse pervenuto per errore, La invitiamo ad eliminarlo senza copiarlo e inoltrarlo a terzi, dandocene gentilmente comunicazione. Grazie. Pursuant to Legislative Decree No. 196/2003, you are hereby informed that this message contains confidential information intended only for the use of the addressee. If you are not the addressee, and have received this message by mistake, please delete it and immediately notify us. You may not copy or disseminate this message to anyone. Thank you. -----Inline Attachment Follows----- ------------------------------------------------------------------------------ For Developers, A Lot Can Happen In A Second. Boundary is the first to Know...and Tell You. Monitor Your Applications in Ultra-Fine Resolution. Try it FREE! http://p.sf.net/sfu/Boundary-d2dvs2 -----Inline Attachment Follows----- _______________________________________________ Simple-support mailing list Sim...@li... https://lists.sourceforge.net/lists/listinfo/simple-support |
|
From: Fabrizio L. <Fab...@au...> - 2012-04-23 10:11:18
|
Hi list, I am successfully using SimpleXML to serialize and deserialize some XML data in an Android application. Until now the XML data has always been known but now I need to read a list of attributes in a tag which I don't know in advance. Any suggestion on how to do this? Even reading the raw string containing the attributes without mapping to a class would be good. Thank you for suggestions. Fabrizio ----------------------------------------------------------------------- Fabrizio Lippolis phone +39.080.56.92.291 e-mail fab...@au...<mailto:fab...@au...> ----------------------------------------------------------------------- Auriga SpA - Strada Vassallo, 1 - 70125 Bari - IT Phone +39.080.56.92.111 - Fax +39.080.56.92.112 www.aurigaspa.com<http://www.aurigaspa.com/> - in...@au...<mailto:in...@au...> ----------------------------------------------------------------------- Ai sensi del D.Lgs. 196/2003 si precisa che le informazioni contenute in questo messaggio sono riservate ed a uso esclusivo del destinatario. Qualora il presente messaggio Le fosse pervenuto per errore, La invitiamo ad eliminarlo senza copiarlo e inoltrarlo a terzi, dandocene gentilmente comunicazione. Grazie. Pursuant to Legislative Decree No. 196/2003, you are hereby informed that this message contains confidential information intended only for the use of the addressee. If you are not the addressee, and have received this message by mistake, please delete it and immediately notify us. You may not copy or disseminate this message to anyone. Thank you. |