Skip to main content
Filter by
Sorted by
Tagged with
1 vote
1 answer
191 views

I'm writing a custom Maven plugin for building a Flatpak from a Java project. In a Maven mojo I understand we use @Parameter annotations to parse pom.xml file configurations. For example: pom.xml: <...
CraigFoote's user avatar
0 votes
1 answer
106 views

I need to deserialize XML into polymorphic Java classes where the subtype is determined not just by a type attribute on <component>, but also by a sibling <version> element. For example, &...
towi's user avatar
  • 22.5k
0 votes
0 answers
59 views

My model classes and serializer classes are like below and my problem is XML output is not rendered correctly. EmployeesRoot.java: @JacksonXmlRootElement(localName = "employees", namespace = ...
Heyyou's user avatar
  • 281
2 votes
1 answer
81 views

I am working on a demo application to read an XML file. When reading the XML file I am noticing a few XML segments are missing on the java object. Here is a sample XML I am using: <person xid="...
Vamsi's user avatar
  • 701
0 votes
0 answers
40 views

I am implementing Jackson with this dependencies implementation ('com.fasterxml.jackson.dataformat:jackson-dataformat-xml:2.18.2') implementation 'javax.xml.stream:stax-api:1.0-2' https://...
stash's user avatar
  • 19
0 votes
0 answers
95 views

My XML <Parent> <childs> <child>1</child> <child>0</child> </childs> </Parent> Pojo Structure is class Parent { @...
stash's user avatar
  • 19
1 vote
1 answer
141 views

I'm trying to deserialize an XML file into a Java object but, apparently, Jackson ignores the root element name. I tried adding the @JacksonXmlRootElement annotation, following suggestions from these ...
Danilo Piazzalunga's user avatar
0 votes
1 answer
80 views

I'm using Retrofit and Jackson with XML parser to transform this XML into data classes. As you can see it's a very rare array inside child_group... there is one item and one info, one item and one ...
NullPointerException's user avatar
1 vote
1 answer
87 views

I have this xml file: <?xml version="1.0" encoding="iso-8859-1" standalone="yes"?> <nms:nmsDocument xmlns:nms="http://www.nms.com/xml" xmlns:xsi="...
Semyon Volokh's user avatar
1 vote
0 answers
29 views

Enable CDATA for all string fields in jackson-dataformat-xml I am aware that we can do it individually by adding @JacksonXmlCData for variable. But want to set it globally while serializing. Currently ...
stash's user avatar
  • 19
1 vote
2 answers
75 views

Jackson seems to be overwriting the older sibling nodes if the order is mixed. See below test case. Is this a bug or is there a way to make this work? Thanks. @JacksonXmlRootElement data class ...
Daniel Cheng's user avatar
1 vote
0 answers
71 views

I would like to use Jackson JsonNode to parse XML files that have this type of structures very often: <list> <element> <a>value 1a</a> <b&...
Óscar's user avatar
  • 740
0 votes
1 answer
74 views

I have a problem with an XML DTO. I was trying to assemble it in Spring Boot 3.3.5 and jackson-dataformat-xml v2.18.2. The issue here is that I have two lists that contain children with the same name ...
ludvikjr's user avatar
0 votes
1 answer
43 views

I have to consume xml documents that have multiple nesting levels with each level containing only one single property. <xml> <level1> <level2> <level3> ...
Mateus Ramos's user avatar
0 votes
1 answer
365 views

I'm trying to read xml from text, modify it, and print it. Creating an object from text to class is unavailable, since I have a class that extends Slf4jEventSender, and I'm trying to override ...
Ant's user avatar
  • 1
3 votes
1 answer
86 views

I have problem with serialization. I have XML : <ds:Transforms> <ds:Transform Algorithm="http://www.w3.org/2000/09/xmldsig#enveloped"/> <ds:Transform Algorithm="...
FPS Bard's user avatar
1 vote
1 answer
113 views

I am facing an issue with mapping of JSON to my class. When I hit the /greeting2 API from Postman, I get {} as response, but when I add @JsonProperty to the field along with @XmlElement, I get the ...
Shubham Shekhar's user avatar
0 votes
0 answers
46 views

I've just come across what I believe is a weird behaviour in Jackson XML (de)serialization. The character \uFFFF is accepted when serializing but leads to an error when deserialized. XmlMapper xml = ...
Gaël J's user avatar
  • 15.9k
1 vote
1 answer
577 views

I have the following minimal code: final var xmlString = "<parent><child>data</child></parent>"; final var xmlMapper = XmlMapper.xmlBuilder() .enable(...
Nikolas's user avatar
  • 45.1k
-1 votes
1 answer
71 views

I am trying to read XML content but it gives me the following error: Unrecognized field "Blob" (class com.example.blobstorage.dto.Blobs), not marked as ignorable (one known property: "...
ilhan's user avatar
  • 9,085
-1 votes
1 answer
53 views

I need to generate 2 xml files which are practically identical except for the name of the first element after the root element Add.xml <root> <addPerson> <person idPerson=&...
Charles's user avatar
  • 65
1 vote
0 answers
142 views

I am trying to use Jackson XML for my jakarta deserialization but for xmlElements it does not seem to work and results in a null object. All other normal fields with just XmlElement do deserialize ...
MrAndre's user avatar
  • 1,047
1 vote
0 answers
29 views

A component in a messaging system should only work on certain properties of each message and be indifferent about the other ones. Messages are being passed in the XML format. Using the Jackson library,...
Josef's user avatar
  • 324
1 vote
1 answer
206 views

I need to serialize an XML, the input I want is something like: <item id="123">description</item> I have a serializer that has the following code: toXmlGenerator....
zepol's user avatar
  • 319
0 votes
0 answers
82 views

I am using the jackson-dataformat-xml to read some xml. In some of the Strings its reading the xml special character & as: &amp; When jackson reads it into a POJO the character is turned into: ...
Javadee's user avatar
  • 177
-1 votes
1 answer
107 views

I am using Jackson to work with my XML data, based on this Baeldung tutorial. I have the following class to model some XML: import com.fasterxml.jackson.core.JsonProcessingException; import com....
SiKing's user avatar
  • 10.4k
1 vote
1 answer
274 views

I have been struggling to find a way to use Jackson to de-serialise this XML into Java: <bitstream encoding="base64Binary">ew0KIklucH...bkpBTVMgQUEiDQp9</bitstream> I have ...
John Ormerod's user avatar
0 votes
0 answers
48 views

I am using the following code: ObjectMapper xmlMapper = new XmlMapper(); JsonNode jsonNode = xmlMapper.readTree("<fakeRoot>" + xmlText + "</fakeRoot>&...
Sorin Postelnicu's user avatar
0 votes
2 answers
216 views

I need write a Java program that will generate a XML with mixed content. It should more or less like this: <foo> <bar><a></a>Some text<b></b></bar> ...
Paweł Adamski's user avatar
1 vote
0 answers
644 views

I am having a org.joda.time.DateTime field in my API response object. The application gives proper response as json but when the Accept header is set to application/xml it fails with error Caused by:...
Shamil Puthukkot's user avatar
0 votes
1 answer
65 views

I'm using Java and Jackson: <dependency> <groupId>com.fasterxml.jackson.dataformat</groupId> <artifactId>jackson-dataformat-xml</artifactId> <version>2....
Bằng Rikimaru's user avatar
0 votes
0 answers
48 views

I have a project with Spring (config is below): <import resource="classpath:payment-impl-context.xml"/> <import resource="classpath:abs-payment-consumer-context.xml"/> ...
Eljah's user avatar
  • 5,433
0 votes
0 answers
230 views

<?xml version="1.0" encoding="UTF-8"?> <Response> <Dataset id="infoList"> <rows> <row> <lvl>4&...
Doo9104's user avatar
  • 53
0 votes
1 answer
46 views

I have xml tag with attribute names which are not restricted to some specific values,like that: <to amount="345.00" service="service" purpose="rent" account="381&...
Eljah's user avatar
  • 5,433
0 votes
1 answer
494 views

I'm trying to deserialize some XML using generics and I get an unexpected result. Here is a simplified example of the code I'm using: Maven dependecy <dependency> <groupId>com....
Charles's user avatar
  • 65
2 votes
2 answers
604 views

I have these 2 XML's that I'm trying to deserialize with jackson-dataformat-xml: <dependency> <groupId>com.fasterxml.jackson.dataformat</groupId> <artifactId>jackson-...
Charles's user avatar
  • 65
1 vote
0 answers
70 views

I am using objectMapper to deserialize xml to my object. My xml has a section that has several possible fields, so I modeled my object using a sealed interface: public record Root(String id, Child ...
polo's user avatar
  • 11
0 votes
1 answer
628 views

During XML deserialization I want to ignore property @XmlSchemaType without modifying annotated class. DO We have any such ignore control through application.property in spring boot?
user3714383's user avatar
0 votes
1 answer
433 views

I'm trying to deserialize an XML list returned from a SOAP request, but I'm getting the following error: com.fasterxml.jackson.databind.JsonMappingException: Duplicate property 'LstMyClassInfo' for [...
Doma Ricardi's user avatar
1 vote
1 answer
97 views

My XML is a workflow exported from Jira. It looks like this: <workflow> <initial-actions> <action>...</action> <action>...</action> </...
KC Wong's user avatar
  • 2,509
0 votes
1 answer
354 views

The closest question I can find currently is this which has no conclusive answer: I am trying to parse XML comments and map it to certain fields in Java. Below was a simple POC I did in attempt to get ...
gunavata's user avatar
0 votes
1 answer
72 views

I have xml with recursive nesting: <root> <groups> <group> <group_data>...group data...</group_data> <object>...object data...</object> ...
r00tGER's user avatar
  • 391
1 vote
2 answers
921 views

In a Spring Boot 2.7.7 application using jackson-databind, jackson-dataformat-xml and jackson-datatype-jsr310 I want to generate this XML with namespaces and, more important, the prefix n1 (must be ...
inquirymind's user avatar
0 votes
1 answer
411 views

I have some xml that looks as follows: <model> <action> <items> <input name="i1"/> <input name="i2"/> <output name=&...
user1154644's user avatar
  • 4,639
1 vote
1 answer
1k views

I have XML like this: .... <dateIssuedField class="org.apache.xerces.jaxp.datatype.XMLGregorianCalendarImpl" resolves-to="org.apache.xerces.jaxp.datatype....
djb's user avatar
  • 1,676
0 votes
1 answer
223 views

In my spring boot application, I have below DTO class @Data public clsss Feed { private int id; private String name; private String title; @Builder @XmlRootElement(name = &...
Harsh Kanakhara's user avatar
0 votes
0 answers
250 views

I am running a spring boot application 2.5.6 and I have the following issue: after adding the dependency jackson-dataformat-xml to my pom.xml the application fails to start failing on initializing one ...
colddog's user avatar
0 votes
1 answer
837 views

I have an endpoint (GET localhost:8080/api/getPerson), which should map the request body into an object. It works well when I send a body as JSON but when sending a XML I get a Unsupported Media Type (...
Paniac's user avatar
  • 38
0 votes
1 answer
277 views

REST API produces the response in JSON and XML format. I am using Jackson to get XML elements as required but when I use @JacksonXmlProperty(isAttribute = true), values get in double quotes; how to ...
Vamsi's user avatar
  • 1
1 vote
1 answer
159 views

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", ...
Henrik Klev's user avatar

1
2 3 4 5
7