526 questions
0 votes
1 answer
65 views
Deserializing Json and XML in one enum
My Spring Boot API an entity and enum with the same name: @Getter @Setter @NoArgsConstructor(access = AccessLevel.PUBLIC) @Root(strict = false, name = "Customer_Type") public class ...
0 votes
0 answers
85 views
SimpleXML in Java add CDATA String to KMZ
I have a program that gets a csv and conver it into a kmz that can be opened in Google Earth The problem is that one of the inputs is the Description that has a table inside So I have this: @Element(...
-1 votes
1 answer
100 views
Deserialize a list of string elements w/ simple-and and retrofit on Android
I am using the simple-xml library (https://simple.sourceforge.net/home.php) to deserialize a list of string elements. <Parent> <PropertyList> <Entry>image/png</Entry> ...
1 vote
1 answer
157 views
Jackson-alternative to SimpleXML's @ElementListUnion
Serializing a list that may contain elements with different types in Java using SimpleXML, you can you something such as class Root { @ElementListUnion({ @ElementList(entry = "Foo", ...
0 votes
1 answer
313 views
Kotlin and SimpleXML - Unable to satisfy ElementList Error
I'm struggling to get simpleXML and Kotlin to read a XML file properly. I've got the following Root class: class ServerConfiguration { @field:Root(strict = false, name = "...
0 votes
1 answer
47 views
Simple XML Mutiple Array
I am trying to convert that xml to Java POJO but having some issues <betting> <over-under status="active" opening="false" date="2022-05-26T19:50:55.243-04:00"...
1 vote
0 answers
115 views
Java simple XML nested elements deserialize using recursion
Is it possible to use recursion with simple framework to deserialize highly nested xml structure? Below is sample xml structure that can contain n-levels of Format element lists and sub-list of either ...
0 votes
1 answer
566 views
Retrofit2+SimpleXML Kotlin how to parse XML
How to create data class for this info: <ValCurs Date="09.02.2022" name="Foreign Currency Market"> <Valute ID="R01010"> <NumCode>036</NumCode> ...
2 votes
1 answer
227 views
SimpleXML: Value and Attribute on same Node
Is it possible, to address a nodes Attributes and Value with SimpleXML? For example in tag "from": <?xml version="1.0" encoding="UTF-8"?> <note> <to&...
1 vote
0 answers
242 views
XML - SimpleFramework parsing to Kotlin/JAVA
I am trying to parse xml data to Kotlin/Java and can't figure out how to do it properly. Simpleframework throws org.simpleframework.xml.core.PersistenceException: Constructor not matched for class ...
1 vote
1 answer
893 views
Android - Parse XML to JSON
My use case require me to fetch an XML formatted as below and need to map it into a JSON object: <settings> <client ip="......" lat="...." lon="...." isp=".....
2 votes
1 answer
197 views
SimpleXML parse ignores @Root name parameter
SimpleXML library has issue. It ignores @Root name. Here is code with test: Class: @Root(name = "res", strict = true) @Data @NoArgsConstructor @AllArgsConstructor class Response { @...
2 votes
1 answer
260 views
SimpleXML get inner XML from particular Element
I have a problem extracting value form one field. Example XML here: <Rule id="xccdf_org.cisecurity.benchmarks_rule_4.1.2_Ensure_that_the_kubelet_service_file_ownership_is_set_to_rootroot" ...
1 vote
2 answers
1k views
How to Implement a POJO for an XML Element that has one single item and one list?
I'm trying to create a POJO for the following structure for deserializing an xml, which I cannot change whatsoever: <Flat> <Door> <Type>Wood</Type> </Door>...
0 votes
1 answer
359 views
parsing HashMap into xml with Simple XML - JAVA
I need to put the values inside a pat as the values of my XML file for Ex: Map<String, String> props = new HashMap<>(); props.put("role", "Admin"); props.put("...