Questions tagged [simple-framework]

Simple is a Java based high performance XML serialization and configuration framework

Simple is a high performance XML serialization and configuration framework for Java. Its goal is to provide an XML framework that enables rapid development of XML configuration and communication systems. This framework aids the development of XML systems with minimal effort and reduced errors. It offers full object serialization and deserialization, maintaining each reference encountered. In essence it is similar to C# XML serialization for the Java platform, but offers additional features for interception and manipulation.

Features:

  • Simple framework with powerful capabilities
  • Can handle cycles in the object graph
  • It requires absolutely no configuration
  • Extremely rapid development with XML
  • Converts to and from human editable XML
  • Contains an XML templating system

Official Website: http://simple.sourceforge.net/home.php

Useful Links:

528 questions
183
votes
19 answers

Unable to create call adapter for class example.Simple

I am using retrofit 2.0.0-beta1 with SimpleXml. I want the retrieve a Simple (XML) resource from a REST service. Marshalling/Unmarshalling the Simple object with SimpleXML works fine. When using this code (converted form pre 2.0.0 code): final…
rmuller
  • 12,062
  • 4
  • 64
  • 92
59
votes
4 answers

Using SimpleXML with Android and Gradle

I'm having troubles trying to compile an Android application with Gradle 0.5.+ and Android Studio, using SimpleXML. This is the error: Gradle: Execution failed for task ':MyApplication:dexDebug'. > Failed to run command: /Applications/Android…
Luca Vitucci
  • 3,674
  • 4
  • 36
  • 60
36
votes
2 answers

How to ignore unused XML elements while deserializing a document?

I'm using SimpleXml to (de)serialize POJOs. Now, I have a big XML which has some elements which are not needed. For instance, with this XML: Used Not used I want to create a POJO which…
Cristian
  • 198,401
  • 62
  • 356
  • 264
25
votes
3 answers

How to generate simple-xml java annotated object from xsd schema

Ok, so I've searched stackoverflow and found unanswered sub-topics regarding this issue, that's why I'd like to have this question clearly pointed out: Is there any tool that will generate the Simple Xml library's annotated java class from an xsd…
24
votes
3 answers

Retrofit2 + SimpleXML in Kotlin: MethodException: Annotation must mark a set or get method

I want to fetch XML data from API and map it to Kotlin model object by using Retrofit2 + SimpleXML in Kotlin. However, I got such as the following error message from SimpleXML. org.simpleframework.xml.core.MethodException: Annotation…
c8112002
  • 375
  • 3
  • 13
24
votes
1 answer

Remove class= attribute

I'm using simple xml library: http://simple.sourceforge.net/home.php I have a problem with @ElementList annotation: if I use this annotation like this: @ElementList protected List elements; My XML file has one more attribute:
user1610075
  • 1,583
  • 3
  • 15
  • 32
21
votes
3 answers

How to use Retrofit and SimpleXML together in downloading and parsing an XML file from a site?

I just started working with Retrofit. I am working on a project that uses SimpleXML. Can somebody provide me an example in which one fetches an XML from a site e.g. http://www.w3schools.com/xml/simple.xml" and reads it out?
greenspand
  • 749
  • 2
  • 8
  • 15
21
votes
7 answers

Proguard obfuscation is breaking simplexml

I am using simplexml in my android project, and everything works fine until I obfuscate the code. Then, errors start pouring in. Part of the XML is as follows:
Viorel
  • 213
  • 2
  • 5
18
votes
3 answers

Parsing XML feed die with "Element is already used"

I'm trying to parse an XML feed using SimpleXML in Android: http://backend.deviantart.com/rss.xml?type=deviation&q=by%3Aspyed+sort%3Atime+meta%3Aall Sample here:
zundi
  • 2,361
  • 1
  • 28
  • 45
17
votes
3 answers

Serialization third-party classes with Simple XML (org.simpleframework.xml)

I have decided to use Simple XML serialization and was stucked with basic problem. I am trying to serialize java.util.UUID class instance as final field in this small class: @Root public class Identity { @Attribute private final UUID id; …
mschayna
  • 1,300
  • 2
  • 16
  • 32
16
votes
8 answers

How to solve the XML parsing performance issue on Android

I have to read a XML file with about ~4000 lines on Android. First I tried the SimpleXML library because it's the easiest and it took about 2 minutes on my HTC Desire. So I thought maybe SimpleXML is so slow because of reflection and all the other…
Korbi
  • 1,438
  • 4
  • 15
  • 22
16
votes
2 answers

using SimpleXML, how to ignore xml elements I don't have in my object class when deserializing

I'm using SimpleXml on Android to deserialize an xml which I have no control over. Now, every time the xml changes, it brakes my app because I don't have the new element defined in my object class. Is there a way I could specify SimpleXML just to…
Alex
  • 836
  • 9
  • 19
15
votes
1 answer

Is it possible to apply a single annotation to multiple use-site targets in Kotlin?

According to the documentation: https://kotlinlang.org/docs/reference/annotations.html You can apply multiple annotations to a single site-use target, but is there a way to apply the same annotation to multiple site-use targets? My use-case is…
bj0
  • 7,893
  • 5
  • 38
  • 49
15
votes
1 answer

Parse date with SimpleFramework

I receive an XML response with an attribute which contains following value: Wed Sep 05 10:56:13 CEST 2012 I have defined in my model class a field with annotation: @Attribute(name = "regDate") private Date registerDate; However it throws an…
hsz
  • 148,279
  • 62
  • 259
  • 315
14
votes
6 answers

Using Simple XML and getting NoClassDefFoundError in Android

I'm trying to use Simple XML to convert my java objects to XML format in my Android application. I'm getting NoClassDefFoundError at line Serializer serializer = new Persister(); java.lang.NoClassDefFoundError:…
user831170
1
2 3
35 36