Questions tagged [xml-deserialization]

XML Deserialization is the process of re-creating an in-memory object from its serialized state which used XML as a data format.

1004 questions
5
votes
1 answer

Jackson empty xml array deserialization

I have an incoming xml from Recurly service with list of transactions. Sometimes it's empty and looks like this: I need to deserialize this using Jackson. I've tried next mapping @XmlRootElement(name =…
5
votes
4 answers

C# Changing the element names of items in a list when serializing/deserializing XML

I have a class defined as below: [XmlRoot("ClassName")] public class ClassName_0 { //stuff... } I then create a list of ClassName_0 like such: var myListInstance= new List(); This is the code I use to serialize: var ser = new…
VARAK
  • 835
  • 10
  • 27
5
votes
1 answer

Deserialize xml to object with Symfony2

I collect some data in xml format through an API and would like to deserialize it in an objects list. I'm using Symfony2 and find out JMSSerializerBundle but I do not really know how to use it. I know that Sf2 allows to serialize/deserialize object…
Mikolaj
  • 190
  • 1
  • 11
4
votes
1 answer

Xml deserialization with nested tags not working

I need to deserialize a XML file to a object. Following is the XML content: Title C:\logo.png
4
votes
3 answers

Deserialize an XML file - an error in xml document (1,2)

I'm trying to deserialize an XML file which I receive from a vendor with XmlSerializer, however im getting this exception: There is an error in XML document (1, 2).InnerException Message " was not expected.. I've searched the…
Lindsay Fisher
  • 43
  • 1
  • 1
  • 6
4
votes
1 answer

How do I Deserialize xml document with namespaces using XmlSerializer?

When deserializing a document using XmlSerializer are not deserialized correctly Document Some Value Some other…
angrifel
  • 724
  • 2
  • 6
  • 19
4
votes
1 answer

Convert an empty tag in XML to java attribute using jackson-dataformat-xml library

I have below XML which need to be converted to POJO in Spring Boot app. I am using jackson-dataformat-xml module for this. Root Pojo: @JacksonXmlRootElement(localName =…
Vazid
  • 713
  • 1
  • 6
  • 19
4
votes
1 answer

Jackson deserialize xml fields with the same name

I would like to deserialize a XML response from an HTTP request into a list of POJOs. The issue I am encountering is that the XML uses the same name "property" for elements that contain different values.
user3221287
  • 337
  • 3
  • 12
4
votes
1 answer

"Unknown Node:VarName" during XML deserialization

I have this sample XML file which I need to deserialize: TohleJeString 24 29.6
Pozzi Userpic
  • 347
  • 8
  • 30
4
votes
2 answers

Deserialize dynamic XML with generics C#

Given the following XML: I can deserialize it like this: [XmlRoot("RESPONSE")] public class Response { [XmlElement(ElementName = "RESULTS")] public Results Results…
JOSEFtw
  • 9,781
  • 9
  • 49
  • 67
4
votes
1 answer

Unmarshalling SOAP Envelope from file in Java

I want to unit-test the mapper objects that map/translate web service types generated by wsimport in to my own domain objects. I also want to test error-scenarios, such as SOAP faults and such, and I am thinking it would be best to test the mapper…
vingrisen
  • 41
  • 2
4
votes
2 answers

Slightly non-trivial data structure: is XmlSerializer right for me?

I'm currently using XmlSerializer to, surprisingly enough :), handle de/serialization of my data structures - I find it wonderfully simple to use, but at the cost of flexibility. At the moment, I'm using it for a tree-based structure; since…
snemarch
  • 4,958
  • 26
  • 38
4
votes
3 answers

Unexpected results when serializing objects to XML

I am having issues creating the schema below... CNumber 00645007803
nlstack01
  • 789
  • 2
  • 7
  • 30
4
votes
2 answers

Unable to Deserialize XML within C#

I have some problem when trying to deserialize the following XML:
MrFiveT
  • 741
  • 6
  • 18
4
votes
2 answers

Deserialize XML Fragment with Namespace using C#

I'm having issues deserializing the following XML fragment (from OneNote):
Tangiest
  • 43,737
  • 24
  • 82
  • 113