simple-support Mailing List for Simple (Page 4)
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...> - 2014-02-12 15:27:48
|
You can use Gson with SimpleXML. It doesn’t care about the SimpleXML annotations:
import org.simpleframework.xml.Attribute;
import org.simpleframework.xml.Root;
import com.google.gson.Gson;
public class SimpleXMLtoJSONtest {
@Root
public static class A {
@Attribute
private int x;
public A() {
}
public A(int x) {
this.x = x;
}
}
public static void main(String... args) {
A a = new A(5);
Gson gson = new Gson();
System.out.println(gson.toJson(a));
}
}
—Robbie
From: Paul Johnston <pa...@pa...<mailto:pa...@pa...>>
Date: Wednesday, February 12, 2014 at 8:50 AM
To: "sim...@li...<mailto:sim...@li...>" <sim...@li...<mailto:sim...@li...>>
Subject: Re: [Simple-support] Transform annotations, simple class names, JSON output, and more
Hi,
I am now able to answer some of my own questions:
1) Can I strip the value element on an ElementMap?
I couldn't find a way to do this, but I modified OutputElement.getChild to add this:
if(name.equals("<SKIP>"))
return this;
I realise this is a bit of a hack, but it does what I need. A proper way of doing this would be appreciated.
2) Can Simple generate short names in class attributes?
I have done this by subclassing TreeStrategy.
3) Can I specify Transformers using an annotation?
At the moment the answer is no. Potentially this could be done, in a similar way to how Converter is done at the moment. But this isn't particularly important to me.
4) Can Simple generate JSON output?
No progress on this just yet.
Is anyone out there? Just a quick mail letting me know the list is alive would be appreciated :-)
Paul
|
|
From: Paul J. <pa...@pa...> - 2014-02-12 13:50:13
|
Hi,
I am now able to answer some of my own questions:
> 1) Can I strip the value element on an ElementMap?
>
I couldn't find a way to do this, but I modified OutputElement.getChild to
add this:
if(name.equals("<SKIP>"))
return this;
I realise this is a bit of a hack, but it does what I need. A proper way of
doing this would be appreciated.
> 2) Can Simple generate short names in class attributes?
>
I have done this by subclassing TreeStrategy.
> 3) Can I specify Transformers using an annotation?
>
At the moment the answer is no. Potentially this could be done, in a
similar way to how Converter is done at the moment. But this isn't
particularly important to me.
> 4) Can Simple generate JSON output?
>
No progress on this just yet.
Is anyone out there? Just a quick mail letting me know the list is alive
would be appreciated :-)
Paul
|
|
From: Paul J. <pa...@pa...> - 2014-02-11 10:09:52
|
Hi,
I've just started using Simple and it looks like it's exactly what I need.
I have been using XStream extensively, and investigated JAX-B but Simple
seems to meet my needs better.
However, I have a few questions!
1) Can I strip the value element on an ElementMap?
If I have a field like this:
@ElementMap(inline=true, attribute=true, entry="sink", key="type")
Map<String,VarInfo> sinks = new HashMap<String,VarInfo>();
It produces XML like this:
<sink type="xss">
<varInfo>
<varInfoItem>
<source class="uk.co.pentest.srcscan.analyse.RouteEnd$Field"
field="test::field"/>
</varInfoItem>
</varInfo>
</field>
I would like to remove the <varInfo> tag - so it's children go directly
inside the <sink> tag.
2) Can Simple generate short names in class attributes?
If we look at the source tag above, it includes the full class name for the
class. I would like it to be the simple class name: Field. Is this
possible? I don't need to read this XML; only generate it.
I am aware of ElementUnion however, this does not suit my needs. The
problem is that I have multiple polymorphic fields in the class (source and
destination) and there are a fair number of polymorphic types. To make this
work with ElementUnion I'd need many many lines of annotations, which would
kill the benefit of Simple.
3) Can I specify Transformers using an annotation?
I am using RegistryMatcher and my transformer is working correctly. But I
have to have a bit of the code where I specify all the transformers. Is it
possible to use an annotation instead?
What I have:
matcher.bind(MethodDescriptor.class,
MethodDescriptor.XmlTransform.class);
What I'd like:
@Transformer(XmlTransform.class)
class MethodDescriptor {
...
4) Can Simple generate JSON output?
I can live with using a beta quality plugin. And I only need to generate
JSON, never read it. If there's no existing plugin for this, I will look at
writing one, and any pointers would be appreciated.
Any help would be greatly appreciated! All the best,
Paul
|
|
From: Roman P. <rom...@gm...> - 2014-02-10 11:32:38
|
Hello. By default, simplexml uses fields to map object data to/from XML. This can be overriden by using @Default(DefaultType.PROPERTY) on each class. In our project, we need to use the property-centric approach, and it's a bit uncomfortable to annotate every single model class, as this is error-prone: someone can forget to annotate some class, a field-centric strategy will be used, so some getter/setter logic will not be called leading to tricky errors. simplexml actually contains a 'meta-default': in org.simpleframework.xml.core.Support class, DefaultType.FIELD is hard-coded as a default for cases when no @Default annotation is specified (an 'override'). Support class is instantiated by Persister, so it seems to be pretty straight-forward to add a parameter (or other way to configure it) defining such a default to the Persister, which would in turn pass this setting via constructor to Support. My question is - is this plausible? Doesn't it break some big architecture rule? I can craft a patch implementing this approach. Best regards, Roman Puchkovskiy |
|
From: Shevek <sh...@an...> - 2014-02-06 08:02:56
|
Simply executing the existing test suite using an affected JDK demonstrates the issue: The last 300 or so tests of the existing suite will just fail, as the full test suite does more than 64K entity expansions. A new test is not required. I note that while my own dev system is currently using the affected 1.7.0_51 b08, the bug is fixed in b10, so this might go away with waiting for the Linux distributions to update. The JDK ticket says it also affects StAX. Our production sites only hit this after a few days' uptime, so it's a good thing I found the bug by executing the simple-xml test suite on an affected JDK before our devs lost a load of time trying to reproduce! S. On 02/05/2014 11:27 PM, Niall Gallagher wrote: > Supply a unit test that proves it is a problem and propose a fix. I have never had a problem with this. Does it occur with Woostox StAX parser also? > > -------------------------------------------- > On Wed, 5/2/14, Shevek <sh...@an...> wrote: > > Subject: [Simple-support] XML readers share the same entity expansion counter > To: "sim...@li..." <sim...@li...> > Received: Wednesday, 5 February, 2014, 8:38 PM > > https://bugs.openjdk.java.net/browse/JDK-8028111 > > This issue has hit two organizations in which I have > deployed SimpleXML. > > Can the SimpleXML community please take a view to a fix or > workaround? > > Thank you. > > S. > > ------------------------------------------------------------------------------ > Managing the Performance of Cloud-Based Applications > Take advantage of what the Cloud has to offer - Avoid Common > Pitfalls. > Read the Whitepaper. > http://pubads.g.doubleclick.net/gampad/clk?id=121051231&iu=/4140/ostg.clktrk > _______________________________________________ > Simple-support mailing list > Sim...@li... > https://lists.sourceforge.net/lists/listinfo/simple-support > > |
|
From: Niall G. <gal...@ya...> - 2014-02-06 07:27:08
|
Supply a unit test that proves it is a problem and propose a fix. I have never had a problem with this. Does it occur with Woostox StAX parser also? -------------------------------------------- On Wed, 5/2/14, Shevek <sh...@an...> wrote: Subject: [Simple-support] XML readers share the same entity expansion counter To: "sim...@li..." <sim...@li...> Received: Wednesday, 5 February, 2014, 8:38 PM https://bugs.openjdk.java.net/browse/JDK-8028111 This issue has hit two organizations in which I have deployed SimpleXML. Can the SimpleXML community please take a view to a fix or workaround? Thank you. S. ------------------------------------------------------------------------------ Managing the Performance of Cloud-Based Applications Take advantage of what the Cloud has to offer - Avoid Common Pitfalls. Read the Whitepaper. http://pubads.g.doubleclick.net/gampad/clk?id=121051231&iu=/4140/ostg.clktrk _______________________________________________ Simple-support mailing list Sim...@li... https://lists.sourceforge.net/lists/listinfo/simple-support |
|
From: Shevek <sh...@an...> - 2014-02-06 04:38:57
|
https://bugs.openjdk.java.net/browse/JDK-8028111 This issue has hit two organizations in which I have deployed SimpleXML. Can the SimpleXML community please take a view to a fix or workaround? Thank you. S. |
|
From: Niall G. <gal...@ya...> - 2014-02-05 07:27:37
|
Hi,
I am afraid there is no way to do this. The only thing I could suggest is to use a converter for the parts you want to parse in non-strict way.
Niall
--------------------------------------------
On Tue, 4/2/14, Lumsdon, Hugo <Hug...@bl...> wrote:
Subject: [Simple-support] Dynamically turn off strict mode
To: "sim...@li..." <sim...@li...>
Received: Tuesday, 4 February, 2014, 9:46 AM
Hi,
We’re after a way to turn
off strict mode dynamically, based on an attribute in the
root element of the source XML document. e.g.
<contentType
dummy=”true”>
i.e. if the “dummy”
attribute is set to true we want to be able to make all
fields / attributes optional – equivalent to called
Serializer.read(x,x, false) – but
dynamically.
Any suggestions how best to do
this?
Thanks,
Hugo.
THIS MESSAGE AND ANY ATTACHMENTS ARE CONFIDENTIAL,
PROPRIETARY, AND MAY BE PRIVILEGED. If this message was
misdirected, BlackRock, Inc. and its subsidiaries,
("BlackRock") does not waive any confidentiality
or privilege. If you are not the intended recipient, please
notify us immediately and destroy the message without
disclosing its contents to anyone. Any distribution, use or
copying of this e-mail or the information it contains by
other than an intended recipient is unauthorized. The views
and opinions expressed in this e-mail message are the
author's own and may not reflect the views and opinions
of BlackRock, unless the author is authorized by BlackRock
to express such views or opinions on its behalf. All email
sent to or from this address is subject to electronic
storage and review by BlackRock. Although BlackRock
operates anti-virus programs, it does not accept
responsibility for any damage whatsoever caused by viruses
being passed.
BlackRock Advisors (UK) Limited and BlackRock Investment
Management (UK) Limited are authorised and regulated by the
Financial Conduct Authority. Registered in England No.
796793 and No. 2020394 respectively. BlackRock Life Limited
is authorised by the Prudential Regulation Authority and
regulated by the Financial Conduct Authority and Prudential
Regulation Authority. Registered in England No. 2223202.
Registered Offices: Drapers Gardens, 12 Throgmorton Avenue,
London EC2N 2DL. BlackRock International Limited is
authorised and regulated by the Financial Conduct Authority
and is a registered investment adviser with the Securities
and Exchange Commission (SEC). Registered in Scotland No.
SC160821. Registered Office: 40 Torphichen Street,
Edinburgh, EH3 8JB.
© 2013 BlackRock, Inc. All Rights reserved.
-----Inline Attachment Follows-----
------------------------------------------------------------------------------
Managing the Performance of Cloud-Based Applications
Take advantage of what the Cloud has to offer - Avoid Common
Pitfalls.
Read the Whitepaper.
http://pubads.g.doubleclick.net/gampad/clk?id=121051231&iu=/4140/ostg.clktrk
-----Inline Attachment Follows-----
_______________________________________________
Simple-support mailing list
Sim...@li...
https://lists.sourceforge.net/lists/listinfo/simple-support
|
|
From: Lumsdon, H. <Hug...@bl...> - 2014-02-04 18:17:07
|
Hi,
We're after a way to turn off strict mode dynamically, based on an attribute in the root element of the source XML document. e.g.
<contentType dummy="true">
i.e. if the "dummy" attribute is set to true we want to be able to make all fields / attributes optional - equivalent to called Serializer.read(x,x, false) - but dynamically.
Any suggestions how best to do this?
Thanks,
Hugo.
THIS MESSAGE AND ANY ATTACHMENTS ARE CONFIDENTIAL, PROPRIETARY, AND MAY BE PRIVILEGED. If this message was misdirected, BlackRock, Inc. and its subsidiaries, ("BlackRock") does not waive any confidentiality or privilege. If you are not the intended recipient, please notify us immediately and destroy the message without disclosing its contents to anyone. Any distribution, use or copying of this e-mail or the information it contains by other than an intended recipient is unauthorized. The views and opinions expressed in this e-mail message are the author's own and may not reflect the views and opinions of BlackRock, unless the author is authorized by BlackRock to express such views or opinions on its behalf. All email sent to or from this address is subject to electronic storage and review by BlackRock. Although BlackRock operates anti-virus programs, it does not accept responsibility for any damage whatsoever caused by viruses being passed.
--
BlackRock Advisors (UK) Limited and BlackRock Investment Management (UK) Limited are authorised and regulated by the Financial Conduct Authority. Registered in England No. 796793 and No. 2020394 respectively. BlackRock Life Limited is authorised by the Prudential Regulation Authority and regulated by the Financial Conduct Authority and Prudential Regulation Authority. Registered in England No. 2223202. Registered Offices: Drapers Gardens, 12 Throgmorton Avenue, London EC2N 2DL. BlackRock International Limited is authorised and regulated by the Financial Conduct Authority and is a registered investment adviser with the Securities and Exchange Commission (SEC). Registered in Scotland No. SC160821. Registered Office: 40 Torphichen Street, Edinburgh, EH3 8JB.
© 2013 BlackRock, Inc. All Rights reserved. |
|
From: Shevek <sh...@an...> - 2014-02-02 22:47:17
|
The patch isn't to fix the JDK bug. It's to fix the bug exhibited by the provided test case, which is to do with Converter getting called for array types, not just element types, but apparently only when CycleStrategy is used. The JDK bug is just an aside, as I had to change the test runner. By the way, an update to org.simpleframework.xml.strategy.CycleStrategyTest.testArray also fails since I wrote this code and test. Thank you very much! S. On 02/02/2014 01:38 PM, Niall Gallagher - Yieldbroker wrote: > I will have a look at the patch and add it in, however the bug below is with the JDK not with the library. I would imagine this will break many libraries relying on StAX, just don't use that version of the JDK. > > -----Original Message----- > From: Shevek [mailto:sh...@an...] > Sent: 01 February 2014 13:27 > To: sim...@li... > Subject: [Simple-support] Array deserialization issue, with test and patch > > I last posted about this in 2012, and here it is again, only this time with a standalone test case, as well as a patch. The issue hasn't changed, and neither has the patch, but hopefully having the test will help. > > Test fails without patch, passes with patch. All other tests pass with patch. > > Please, please, please fix this. It's been bugging us for two years now, and we've been carrying custom binaries of simple-xml in all our repositories. > > Previous thread (2012) was: "RegistryStrategy causes NPE when Converter is used" > > http://sourceforge.net/mailarchive/forum.php?thread_name=1336375189.50334.YahooMailClassic%40web161005.mail.bf1.yahoo.com&forum_name=simple-support > > I mirrored simple-xml to github to make it easier to write and run tests. I also discovered that the simple-xml test suite fails on modern JDK due to https://bugs.openjdk.java.net/browse/JDK-8028111 > > S. > |
|
From: Niall G. - Y. <Nia...@yi...> - 2014-02-02 21:38:35
|
I will have a look at the patch and add it in, however the bug below is with the JDK not with the library. I would imagine this will break many libraries relying on StAX, just don't use that version of the JDK. -----Original Message----- From: Shevek [mailto:sh...@an...] Sent: 01 February 2014 13:27 To: sim...@li... Subject: [Simple-support] Array deserialization issue, with test and patch I last posted about this in 2012, and here it is again, only this time with a standalone test case, as well as a patch. The issue hasn't changed, and neither has the patch, but hopefully having the test will help. Test fails without patch, passes with patch. All other tests pass with patch. Please, please, please fix this. It's been bugging us for two years now, and we've been carrying custom binaries of simple-xml in all our repositories. Previous thread (2012) was: "RegistryStrategy causes NPE when Converter is used" http://sourceforge.net/mailarchive/forum.php?thread_name=1336375189.50334.YahooMailClassic%40web161005.mail.bf1.yahoo.com&forum_name=simple-support I mirrored simple-xml to github to make it easier to write and run tests. I also discovered that the simple-xml test suite fails on modern JDK due to https://bugs.openjdk.java.net/browse/JDK-8028111 S. |
|
From: Shevek <sh...@an...> - 2014-02-01 02:58:36
|
I last posted about this in 2012, and here it is again, only this time with a standalone test case, as well as a patch. The issue hasn't changed, and neither has the patch, but hopefully having the test will help. Test fails without patch, passes with patch. All other tests pass with patch. Please, please, please fix this. It's been bugging us for two years now, and we've been carrying custom binaries of simple-xml in all our repositories. Previous thread (2012) was: "RegistryStrategy causes NPE when Converter is used" http://sourceforge.net/mailarchive/forum.php?thread_name=1336375189.50334.YahooMailClassic%40web161005.mail.bf1.yahoo.com&forum_name=simple-support I mirrored simple-xml to github to make it easier to write and run tests. I also discovered that the simple-xml test suite fails on modern JDK due to https://bugs.openjdk.java.net/browse/JDK-8028111 S. |
|
From: Aaron D. <di...@he...> - 2014-01-29 22:29:37
|
Am 11.12.2013 10:43, schrieb Tomáš Procházka:
> I have something like this
>
> @ElementUnion({
> @Element(name="ExportTransportCompanyRequest_1",
> type=ExportTransportCompanyRequest.class),
> [...]
> @Element(name="CreateCustomerTokenRequest_1", type =
> CreateCustomerTokenRequest.class)
> })
>
> In the request object and the some in response object.
> And it looks that library process all classes and it's annotations
> during first call. Is this necessary?
How do you know this?
Is it really SimpleXml that processes the classes or is it simply the
Java classloader loading all necessary classes?
Java can't do lazy loading of some annotations; if you access the outer
@ElementUnion annotation, then everything inside is materialized.
If that's a problem for you, you can't use unions.
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://blog.pdark.de/
|
|
From: Yaroslav N. <yar...@is...> - 2014-01-16 10:42:24
|
Hi!
I have a data model with classes both generic and immutable like in code
snippet below:
package ru.ispras.texterra.core;
import java.io.StringReader;
import java.io.StringWriter;
import org.simpleframework.xml.Element;
import org.simpleframework.xml.core.Persister;
public class SimpleSerializerTestCase {
public static class SomeGeneric<T> {
@Element(name = "value")
private final T value;
public SomeGeneric(@Element(name = "value") T value) {
this.value = value;
}
}
public static class SomeConcrete extends SomeGeneric<String> {
public SomeConcrete(@Element(name = "value") String value) {
super(value);
}
}
public static void main(String[] args) throws Exception {
Persister persister = new Persister();
StringWriter writer = new StringWriter();
persister.write(new SomeConcrete(""), writer);
StringReader reader = new StringReader(writer.toString());
// Exception in thread "main"
org.simpleframework.xml.core.ValueRequiredException: Empty
// value for @org.simpleframework.xml.Element(name=value,
data=false, required=true,
// type=void) on field 'value' private final java.lang.Object
//
ru.ispras.texterra.core.SimpleSerializerTestCase$SomeGeneric.value in class
//
ru.ispras.texterra.core.SimpleSerializerTestCase$SomeConcrete at line 2
SomeConcrete read = persister.read(SomeConcrete.class, reader);
}
}
org.simpleframework.xml.stream.NodeReader.readValue(InputNode) returns
null in this case instead of empty string and this leads to
deserialization fail. Could you suggest any workarounds?
|
|
From: Tek W. <tek...@gm...> - 2014-01-15 14:00:06
|
Never mind. The first cup of coffee did not kick in yet. The problem was with my de-serializing code, where I was casting a parent to a child. Good job Niall. Once again simplexml saved me globs of time! |
|
From: Tek W. <tek...@gm...> - 2014-01-15 13:20:51
|
I need this work with this type of XML
<component class="com.abc.Container" type="Container" >
<component class="com.abc.Label" type="Label" name="Label201"/>
<component class="com.abc.Button" type="Button" name="Button202"/>
My class structure is:
@Root(name = "component")
public class com.abc.BaseComponent {
@ElementList(inline = true,required=false)
ArrayList<BaseComponent> childComponents = null;
}
and
@Root(name = "component")
public class Button extends BaseComponent {
Button() {
super();
}
}
@Root(name = "component")
public class Label extends BaseComponent {
Label() {
super();
}
}
@Root(name = "component")
public class Container extends BaseComponent {
Container () {
super();
}
}
So the logic is that the Container can add any other object as long as it
is of BaseComponent type.
On serialization, I do get the desired XML, however I can not deserialize
it back from XML to Objects.
I tried to use @ElementListUnion with listing of each BaseComponent type in
it, that changes the XML structure. Its almost like the format that I need
to support is using attributes and simplexml like to use elements.
Regards
|
|
From: Boris G. <bo...@gl...> - 2014-01-14 15:13:17
|
you are right I just build small test and it works eater way, i guess
problem was on my end.
Thank you.
Boris
On 1/12/2014 5:32 PM, Niall Gallagher - Yieldbroker wrote:
> That does not sound right, order of declaration should make no difference, if it does not work then there must be a bug..
>
> -----Original Message-----
> From: Boris Gligich [mailto:bo...@gl...]
> Sent: 13 January 2014 01:06
> To: Niall Gallagher; sim...@li...
> Subject: Re: [Simple-support] Element 'name' is also a path name in class ...
>
> Thank you for quick replay, that worked...
>
> Also i like to point out that
>
> @Path("name")
> @Text
> String name
>
> has to be before
>
> @Path("name")
> @Attribute
> String id;
>
> other way it doesn't work.
>
> Thank you
>
> Boris
>
> On 1/12/2014 12:48 AM, Niall Gallagher wrote:
>> The below should work
>>
>> @Path("name")
>> @Text
>> String name
>>
>> @Path("name")
>> @Attribute
>> String id;
>>
>> Niall
>>
>>
>> --------------------------------------------
>> On Sat, 11/1/14, Boris Gligich <bo...@gl...> wrote:
>>
>> Subject: [Simple-support] Element 'name' is also a path name in class ...
>> To: sim...@li...
>> Received: Saturday, 11 January, 2014, 6:31 PM
>>
>> Hi
>>
>> Thank you for this great frame work, but i have question,
>> how do i get
>> id? they way i get fails with error
>>
>> <user>
>>
>> <username>user</username>
>>
>> <password>password</password>
>> <name id="3">My
>> Name</name>
>> </user>
>>
>> and class
>>
>> class user{
>>
>> @Element
>> String username;
>>
>> @Element
>> String password;
>>
>> @Element
>> String name ;
>>
>> @Attribute
>> @Path("name")
>> public String id;
>>
>> }
>>
>> Thank you
>>
>> Boris
>>
>> ------------------------------------------------------------------------------
>> CenturyLink Cloud: The Leader in Enterprise Cloud Services.
>> Learn Why More Businesses Are Choosing CenturyLink Cloud
>> For
>> Critical Workloads, Development Environments &
>> Everything In Between.
>> Get a Quote or Start a Free Trial Today.
>> http://pubads.g.doubleclick.net/gampad/clk?id=119420431&iu=/4140/ostg.clktrk
>> _______________________________________________
>> Simple-support mailing list
>> Sim...@li...
>> https://lists.sourceforge.net/lists/listinfo/simple-support
>>
>
> ------------------------------------------------------------------------------
> CenturyLink Cloud: The Leader in Enterprise Cloud Services.
> Learn Why More Businesses Are Choosing CenturyLink Cloud For Critical Workloads, Development Environments & Everything In Between.
> Get a Quote or Start a Free Trial Today.
> http://pubads.g.doubleclick.net/gampad/clk?id=119420431&iu=/4140/ostg.clktrk
> _______________________________________________
> Simple-support mailing list
> Sim...@li...
> https://lists.sourceforge.net/lists/listinfo/simple-support
|
|
From: Robbie B. <Rob...@sa...> - 2014-01-13 15:03:21
|
For JSON, I’d look at gson: http://code.google.com/p/google-gson/ It’s like SimpleXML but for JSON. —Robert Brown From: Tek Wojenski <tek...@gm...<mailto:tek...@gm...>> Date: Sunday, January 12, 2014 at 6:45 AM To: "sim...@li...<mailto:sim...@li...>" <sim...@li...<mailto:sim...@li...>> Subject: [Simple-support] JSON support I love the product! Keep up the good work Niall! I'm working in an new environment where I do not have reflection. So I will have to go to JSON to parse my object in. I have considerable amount of code written to serialize/deserialze to XML with simpleXML. Is there a way for simpleXML to serialize/produce JSON output? I do not need it to deserialize, just to serialize? This way I will be half way there without changing my design time code. Regards Tek Wojenski |
|
From: Niall G. - Y. <Nia...@yi...> - 2014-01-12 22:32:52
|
That does not sound right, order of declaration should make no difference, if it does not work then there must be a bug..
-----Original Message-----
From: Boris Gligich [mailto:bo...@gl...]
Sent: 13 January 2014 01:06
To: Niall Gallagher; sim...@li...
Subject: Re: [Simple-support] Element 'name' is also a path name in class ...
Thank you for quick replay, that worked...
Also i like to point out that
@Path("name")
@Text
String name
has to be before
@Path("name")
@Attribute
String id;
other way it doesn't work.
Thank you
Boris
On 1/12/2014 12:48 AM, Niall Gallagher wrote:
> The below should work
>
> @Path("name")
> @Text
> String name
>
> @Path("name")
> @Attribute
> String id;
>
> Niall
>
>
> --------------------------------------------
> On Sat, 11/1/14, Boris Gligich <bo...@gl...> wrote:
>
> Subject: [Simple-support] Element 'name' is also a path name in class ...
> To: sim...@li...
> Received: Saturday, 11 January, 2014, 6:31 PM
>
> Hi
>
> Thank you for this great frame work, but i have question,
> how do i get
> id? they way i get fails with error
>
> <user>
>
> <username>user</username>
>
> <password>password</password>
> <name id="3">My
> Name</name>
> </user>
>
> and class
>
> class user{
>
> @Element
> String username;
>
> @Element
> String password;
>
> @Element
> String name ;
>
> @Attribute
> @Path("name")
> public String id;
>
> }
>
> Thank you
>
> Boris
>
> ------------------------------------------------------------------------------
> CenturyLink Cloud: The Leader in Enterprise Cloud Services.
> Learn Why More Businesses Are Choosing CenturyLink Cloud
> For
> Critical Workloads, Development Environments &
> Everything In Between.
> Get a Quote or Start a Free Trial Today.
> http://pubads.g.doubleclick.net/gampad/clk?id=119420431&iu=/4140/ostg.clktrk
> _______________________________________________
> Simple-support mailing list
> Sim...@li...
> https://lists.sourceforge.net/lists/listinfo/simple-support
>
------------------------------------------------------------------------------
CenturyLink Cloud: The Leader in Enterprise Cloud Services.
Learn Why More Businesses Are Choosing CenturyLink Cloud For Critical Workloads, Development Environments & Everything In Between.
Get a Quote or Start a Free Trial Today.
http://pubads.g.doubleclick.net/gampad/clk?id=119420431&iu=/4140/ostg.clktrk
_______________________________________________
Simple-support mailing list
Sim...@li...
https://lists.sourceforge.net/lists/listinfo/simple-support
|
|
From: Boris G. <bo...@gl...> - 2014-01-12 14:06:07
|
Thank you for quick replay, that worked...
Also i like to point out that
@Path("name")
@Text
String name
has to be before
@Path("name")
@Attribute
String id;
other way it doesn't work.
Thank you
Boris
On 1/12/2014 12:48 AM, Niall Gallagher wrote:
> The below should work
>
> @Path("name")
> @Text
> String name
>
> @Path("name")
> @Attribute
> String id;
>
> Niall
>
>
> --------------------------------------------
> On Sat, 11/1/14, Boris Gligich <bo...@gl...> wrote:
>
> Subject: [Simple-support] Element 'name' is also a path name in class ...
> To: sim...@li...
> Received: Saturday, 11 January, 2014, 6:31 PM
>
> Hi
>
> Thank you for this great frame work, but i have question,
> how do i get
> id? they way i get fails with error
>
> <user>
>
> <username>user</username>
>
> <password>password</password>
> <name id="3">My
> Name</name>
> </user>
>
> and class
>
> class user{
>
> @Element
> String username;
>
> @Element
> String password;
>
> @Element
> String name ;
>
> @Attribute
> @Path("name")
> public String id;
>
> }
>
> Thank you
>
> Boris
>
> ------------------------------------------------------------------------------
> CenturyLink Cloud: The Leader in Enterprise Cloud Services.
> Learn Why More Businesses Are Choosing CenturyLink Cloud
> For
> Critical Workloads, Development Environments &
> Everything In Between.
> Get a Quote or Start a Free Trial Today.
> http://pubads.g.doubleclick.net/gampad/clk?id=119420431&iu=/4140/ostg.clktrk
> _______________________________________________
> Simple-support mailing list
> Sim...@li...
> https://lists.sourceforge.net/lists/listinfo/simple-support
>
|
|
From: Tek W. <tek...@gm...> - 2014-01-12 11:45:57
|
I love the product! Keep up the good work Niall! I'm working in an new environment where I do not have reflection. So I will have to go to JSON to parse my object in. I have considerable amount of code written to serialize/deserialze to XML with simpleXML. Is there a way for simpleXML to serialize/produce JSON output? I do not need it to deserialize, just to serialize? This way I will be half way there without changing my design time code. Regards Tek Wojenski |
|
From: Niall G. <gal...@ya...> - 2014-01-12 05:48:37
|
The below should work
@Path("name")
@Text
String name
@Path("name")
@Attribute
String id;
Niall
--------------------------------------------
On Sat, 11/1/14, Boris Gligich <bo...@gl...> wrote:
Subject: [Simple-support] Element 'name' is also a path name in class ...
To: sim...@li...
Received: Saturday, 11 January, 2014, 6:31 PM
Hi
Thank you for this great frame work, but i have question,
how do i get
id? they way i get fails with error
<user>
<username>user</username>
<password>password</password>
<name id="3">My
Name</name>
</user>
and class
class user{
@Element
String username;
@Element
String password;
@Element
String name ;
@Attribute
@Path("name")
public String id;
}
Thank you
Boris
------------------------------------------------------------------------------
CenturyLink Cloud: The Leader in Enterprise Cloud Services.
Learn Why More Businesses Are Choosing CenturyLink Cloud
For
Critical Workloads, Development Environments &
Everything In Between.
Get a Quote or Start a Free Trial Today.
http://pubads.g.doubleclick.net/gampad/clk?id=119420431&iu=/4140/ostg.clktrk
_______________________________________________
Simple-support mailing list
Sim...@li...
https://lists.sourceforge.net/lists/listinfo/simple-support
|
|
From: Boris G. <bo...@gl...> - 2014-01-12 02:44:15
|
Hi
Thank you for this great frame work, but i have question, how do i get
id? they way i get fails with error
<user>
<username>user</username>
<password>password</password>
<name id="3">My Name</name>
</user>
and class
class user{
@Element
String username;
@Element
String password;
@Element
String name ;
@Attribute
@Path("name")
public String id;
}
Thank you
Boris
|
|
From: Tek W. <tek...@gm...> - 2013-12-18 15:42:41
|
Pretty interesting with that arm twisting thing! Niall Gallagher, thank you for providing us with this library. Will you please do whatever is most convenient for YOU to keep supporting it. Regards Tek Wojenski ---------- Forwarded message ---------- From: Mihael Schmidt <msc...@sg...> Date: Wed, Dec 18, 2013 at 9:51 AM Subject: Re: [Simple-support] Is this project still alive? To: sim...@li... Perhaps it ain't meant to be for him. I have been using first CVS then SVN, now Git and Mercurial (and sf.net supports all these) and I must say that the source code versioning is the least of my worries when developing my side projects. Niall, you are doing a great job. Great library. Thanx. Mihael On 18.12.2013 15:46, Robbie Brown wrote: > Ok, now, that’s getting a little rude: “But if somebody can’t know > it….”. Looking at this project, I’m pretty sure he can. I like Git. I > use Git for all my repositories, but I also appreciate this incredible > library that Niall Gallagher has written. SimpleXML has saved me an > unbelievable amount of work. I don’t care if he distributes it in a ZIP > file. Just keep it open and available. Thanks, Niall. > > —Robert Brown > > > From: Tomáš Procházka <tom...@at... > <mailto:tom...@at...>> > Date: Wednesday, December 18, 2013 at 6:30 AM > To: Mihael Schmidt <msc...@sg... <mailto:msc...@sg...>> > Cc: "sim...@li... > <mailto:sim...@li...>" > <sim...@li... > <mailto:sim...@li...>> > Subject: Re: [Simple-support] Is this project still alive? > > Many project live only from contribution, like > https://github.com/jayway/maven-android-plugin. And I think that it is > not top 10 project. Or our small project > https://github.com/inmite/android-styled-dialogs have 5 merged pull > requests already. > > And GIT/Hq is also many times better than SVN. > > But if somebody can't know it.... > > -- > Ing. Tomáš Procházka > > > 2013/12/18 Mihael Schmidt <msc...@sg... <mailto:msc...@sg...>> > > github may have this nice feature but it offers almost nothing else and > you are also tied to git. > > and who does a fork and contributes back to the project? i would say > that if your project is not one of the top ten projects than it wouldn't > get even one fork/contribution in a year. > > sf.net <http://sf.net> may not provide your favored development > workflow but it is one > of the top sites for open source projects and has many options for all > types of projects and development styles. > > my 2 cents > > mihael > > > On 18.12.2013 00:42, Tomáš Procházka wrote: > > Main problem of sourceForge is absence of fork/pull mechanism. > > Everyone can by one click make fork, fix any bug and pull changes back > > to you by Pull Request, which you can check and accept by one click. > > It's extremely easy and all forks are still at the one place. > > Now If someone decide to fix some problem is extremely complicated to > > send you some patch back. > > > > And this is not one benefit > > GIT has also integrated bugtracker with GIT and with Integration > server. > > When someone send you pull request with some change it will be > > automatically run build on CI server and result will be write to the > > comment in the bugtracker, you intermediately know, if changes broken > > any tests. > > > > And some other great function like code review, etc. > > SourceForge is now only for historical and already dead projects. > > > > -- > > Ing. Tomáš Procházka > > > > > > 2013/12/17 Niall Gallagher - Yieldbroker > > <Nia...@yi... > <mailto:Nia...@yi...> > <mailto:Nia...@yi... > <mailto:Nia...@yi...>>> > > > > Hi,____ > > > > __ __ > > > > Yes it is still alive. I am happy with sourceforge right now and > > have no intention of moving at the moment.____ > > > > __ __ > > > > Thanks,____ > > > > Niall____ > > > > __ __ > > > > *From:*Tomáš Procházka [mailto:tom...@at... > <mailto:tom...@at...> > > <mailto:tom...@at... > <mailto:tom...@at...>>] > > *Sent:* 18 December 2013 06:11 > > *To:* sim...@li... > <mailto:sim...@li...> > > <mailto:sim...@li... > <mailto:sim...@li...>> > > *Subject:* [Simple-support] Is this project still alive?____ > > > > __ __ > > > > Is this project still alive?____ > > > > What about migrate project to some modern project hosting like > > github.com <http://github.com> <http://github.com>?____ > > > > It is much more usable for development :-(____ > > > > > > ____ > > > > -- > > Tomáš Procházka____ > > > > > > > > > > > ------------------------------------------------------------------------------ > > Rapidly troubleshoot problems before they affect your business. > Most IT > > organizations don't have a clear picture of how application > performance > > affects their revenue. With AppDynamics, you get 100% visibility > into your > > Java,.NET,& PHP application. Start your 15-day FREE TRIAL of > AppDynamics Pro! > > > http://pubads.g.doubleclick.net/gampad/clk?id=84349831&iu=/4140/ostg.clktrk > < http://pubads.g.doubleclick.net/gampad/clk?id=84349831&iu=/4140/ostg.clktrk> > > > > > > > > _______________________________________________ > > Simple-support mailing list > > Sim...@li... > <mailto:Sim...@li...> > > https://lists.sourceforge.net/lists/listinfo/simple-support > > -- > > Schulz Gebäudeservice GmbH & Co. KG > Dr.-Max-Ilgner-Straße 17 > 32339 Espelkamp > Persönlich haftende Gesellschafterin: > Gebäudereinigung Joachim Schulz > Verwaltungsgesellschaft mbH > Telefon: +49 5772 9100 0 <tel:%2B49%205772%209100%200> > Telefax: +49 5772 9100 11 <tel:%2B49%205772%209100%2011> > Email: zen...@sg... <mailto:zen...@sg...> > Internet: www.sgbs.de <http://www.sgbs.de> > Geschäftsführer: Joachim und Dirk Schulz, Norbert Kosica > Handelsregister Bad Oeynhausen: HRA 5902, HRB 8591 > UST-Id-Nr.: DE 125752702 > > ------------------------------------------------------------------------------ > Rapidly troubleshoot problems before they affect your business. Most IT > organizations don't have a clear picture of how application performance > affects their revenue. With AppDynamics, you get 100% visibility > into your > Java,.NET, & PHP application. Start your 15-day FREE TRIAL of > AppDynamics Pro! > http://pubads.g.doubleclick.net/gampad/clk?id=84349831&iu=/4140/ostg.clktrk > < http://pubads.g.doubleclick.net/gampad/clk?id=84349831&iu=/4140/ostg.clktrk> > _______________________________________________ > Simple-support mailing list > Sim...@li... > <mailto:Sim...@li...> > https://lists.sourceforge.net/lists/listinfo/simple-support > > -- Schulz Gebäudeservice GmbH & Co. KG Dr.-Max-Ilgner-Straße 17 32339 Espelkamp Persönlich haftende Gesellschafterin: Gebäudereinigung Joachim Schulz Verwaltungsgesellschaft mbH Telefon: +49 5772 9100 0 Telefax: +49 5772 9100 11 Email: zen...@sg... Internet: www.sgbs.de Geschäftsführer: Joachim und Dirk Schulz, Norbert Kosica Handelsregister Bad Oeynhausen: HRA 5902, HRB 8591 UST-Id-Nr.: DE 125752702 ------------------------------------------------------------------------------ Rapidly troubleshoot problems before they affect your business. Most IT organizations don't have a clear picture of how application performance affects their revenue. With AppDynamics, you get 100% visibility into your Java,.NET, & PHP application. Start your 15-day FREE TRIAL of AppDynamics Pro! http://pubads.g.doubleclick.net/gampad/clk?id=84349831&iu=/4140/ostg.clktrk _______________________________________________ Simple-support mailing list Sim...@li... https://lists.sourceforge.net/lists/listinfo/simple-support |
|
From: Robbie B. <Rob...@sa...> - 2013-12-18 15:01:41
|
Ok, now, that’s getting a little rude: “But if somebody can’t know it….”. Looking at this project, I’m pretty sure he can. I like Git. I use Git for all my repositories, but I also appreciate this incredible library that Niall Gallagher has written. SimpleXML has saved me an unbelievable amount of work. I don’t care if he distributes it in a ZIP file. Just keep it open and available. Thanks, Niall. —Robert Brown From: Tomáš Procházka <tom...@at...<mailto:tom...@at...>> Date: Wednesday, December 18, 2013 at 6:30 AM To: Mihael Schmidt <msc...@sg...<mailto:msc...@sg...>> Cc: "sim...@li...<mailto:sim...@li...>" <sim...@li...<mailto:sim...@li...>> Subject: Re: [Simple-support] Is this project still alive? Many project live only from contribution, like https://github.com/jayway/maven-android-plugin. And I think that it is not top 10 project. Or our small project https://github.com/inmite/android-styled-dialogs have 5 merged pull requests already. And GIT/Hq is also many times better than SVN. But if somebody can't know it.... -- Ing. Tomáš Procházka 2013/12/18 Mihael Schmidt <msc...@sg...<mailto:msc...@sg...>> github may have this nice feature but it offers almost nothing else and you are also tied to git. and who does a fork and contributes back to the project? i would say that if your project is not one of the top ten projects than it wouldn't get even one fork/contribution in a year. sf.net<http://sf.net> may not provide your favored development workflow but it is one of the top sites for open source projects and has many options for all types of projects and development styles. my 2 cents mihael On 18.12.2013 00:42, Tomáš Procházka wrote: > Main problem of sourceForge is absence of fork/pull mechanism. > Everyone can by one click make fork, fix any bug and pull changes back > to you by Pull Request, which you can check and accept by one click. > It's extremely easy and all forks are still at the one place. > Now If someone decide to fix some problem is extremely complicated to > send you some patch back. > > And this is not one benefit > GIT has also integrated bugtracker with GIT and with Integration server. > When someone send you pull request with some change it will be > automatically run build on CI server and result will be write to the > comment in the bugtracker, you intermediately know, if changes broken > any tests. > > And some other great function like code review, etc. > SourceForge is now only for historical and already dead projects. > > -- > Ing. Tomáš Procházka > > > 2013/12/17 Niall Gallagher - Yieldbroker > <Nia...@yi...<mailto:Nia...@yi...> <mailto:Nia...@yi...<mailto:Nia...@yi...>>> > > Hi,____ > > __ __ > > Yes it is still alive. I am happy with sourceforge right now and > have no intention of moving at the moment.____ > > __ __ > > Thanks,____ > > Niall____ > > __ __ > > *From:*Tomáš Procházka [mailto:tom...@at...<mailto:tom...@at...> > <mailto:tom...@at...<mailto:tom...@at...>>] > *Sent:* 18 December 2013 06:11 > *To:* sim...@li...<mailto:sim...@li...> > <mailto:sim...@li...<mailto:sim...@li...>> > *Subject:* [Simple-support] Is this project still alive?____ > > __ __ > > Is this project still alive?____ > > What about migrate project to some modern project hosting like > github.com<http://github.com> <http://github.com>?____ > > It is much more usable for development :-(____ > > > ____ > > -- > Tomáš Procházka____ > > > > > ------------------------------------------------------------------------------ > Rapidly troubleshoot problems before they affect your business. Most IT > organizations don't have a clear picture of how application performance > affects their revenue. With AppDynamics, you get 100% visibility into your > Java,.NET,& PHP application. Start your 15-day FREE TRIAL of AppDynamics Pro! > http://pubads.g.doubleclick.net/gampad/clk?id=84349831&iu=/4140/ostg.clktrk > > > > _______________________________________________ > Simple-support mailing list > Sim...@li...<mailto:Sim...@li...> > https://lists.sourceforge.net/lists/listinfo/simple-support -- Schulz Gebäudeservice GmbH & Co. KG Dr.-Max-Ilgner-Straße 17 32339 Espelkamp Persönlich haftende Gesellschafterin: Gebäudereinigung Joachim Schulz Verwaltungsgesellschaft mbH Telefon: +49 5772 9100 0<tel:%2B49%205772%209100%200> Telefax: +49 5772 9100 11<tel:%2B49%205772%209100%2011> Email: zen...@sg...<mailto:zen...@sg...> Internet: www.sgbs.de<http://www.sgbs.de> Geschäftsführer: Joachim und Dirk Schulz, Norbert Kosica Handelsregister Bad Oeynhausen: HRA 5902, HRB 8591 UST-Id-Nr.: DE 125752702 ------------------------------------------------------------------------------ Rapidly troubleshoot problems before they affect your business. Most IT organizations don't have a clear picture of how application performance affects their revenue. With AppDynamics, you get 100% visibility into your Java,.NET, & PHP application. Start your 15-day FREE TRIAL of AppDynamics Pro! http://pubads.g.doubleclick.net/gampad/clk?id=84349831&iu=/4140/ostg.clktrk _______________________________________________ Simple-support mailing list Sim...@li...<mailto:Sim...@li...> https://lists.sourceforge.net/lists/listinfo/simple-support |