XML Deserialization is the process of re-creating an in-memory object from its serialized state which used XML as a data format.
Questions tagged [xml-deserialization]
1004 questions
8
votes
2 answers
Proguard - PersistenceException: Constructor not matched for class
I am using retrofit2.0 in my app with simpleframework.xml library.
The problem is when I run the app without proguard it works fine however when I run proguard I get the following Error in logs.
E/ERROR: java.lang.RuntimeException:…

Abbas
- 3,529
- 5
- 36
- 64
8
votes
1 answer
Deserialized Object type issues - specifically with Powershell 5 classes and Import-CliXml
I'm having issues with Powershell 5 classes and object types when reimporting deserialized objects using the Import-CliXml command.
I have an object of type Computer and I wish to store this as xml and then reimport this next time the script is…

Dan Hampshire
- 105
- 2
- 6
8
votes
3 answers
Deserialization issue from XML to POJO with Jackson: no String-argument constructor/factory method to deserialize from String value
I've got an XML document which I need to convert (deserialize) into Java POJO. I cannot change the structure of the XML document.
I use Java 8, and Jackson framework for mapping.
Gradle dependencies:
dependencies {
…

ucas
- 417
- 1
- 11
- 30
8
votes
1 answer
Deserializing xml, including namespace
I am trying to deserialize some XML and I can't get the namespace / xsi:type="Model" to work. If xsi:type="Model" is left out of the XML it works, but it has to be there. If I leave the namespace out of my Model, I get an error, if I rename it, I…

forte
- 83
- 5
8
votes
2 answers
How to Deserialize XMLDocument to object in C#?
I have a .Net webserivce that accepts XML in string format. XML String sent into the webserivce can represent any Object in the system. I need to check the first node to figure out what object to deserialize the XML string. For this I will have to…

Deepfreezed
- 567
- 2
- 10
- 18
8
votes
2 answers
Ignore unknown types when deserializing xml
I've got this code:
[XmlType( "Metadata" )]
[Serializable]
public class MetadataContainer : List
{
}
[XmlType( "Meta" )]
[XmlInclude( typeof( ReadonlyMetadata ) )]
[Serializable]
public abstract class MetadataBase
{
}
[XmlType(…

Allrameest
- 4,364
- 2
- 34
- 50
7
votes
3 answers
XML Deserialization of string elements with newlines in C#
I can't seem to figure out why this test doesn't pass
The test is:
given the following XML:
1234567890
ABCXYZ
and the following class:
class Foo …
user15486
7
votes
3 answers
fast way to deserialize XML with special characters
I am looking for fast way to deserialize xml, that has special characters in it like ö.
I was using XMLReader and it fails to deserialze such characters.
Any suggestion?
EDIT: I am using C#.
Code is as follows:
XElement element =.. //has the…

genericuser
- 1,430
- 4
- 22
- 40
7
votes
3 answers
How to deserialize soap response?
I'm trying to deserialize following xml to c# object:

Badhon Jain
- 938
- 6
- 20
- 38
7
votes
1 answer
Remove xmlns:i and xmlns from webapi
I have been asked to provide the following XML document from an http endpoint, exactly like:-

Rippo
- 22,117
- 14
- 78
- 117
7
votes
1 answer
mixed XML decoding in golang preserving order
I need to extract offers from an XML, but taking into consideration nodes order:
The following struct would decode the values, but into two…

Miroslav
- 1,960
- 1
- 13
- 26
7
votes
2 answers
Best Practice for Serialize/Deserialize from Java to XML
What is the most appropriate way to serialize Java Classes to XML?
I tried JAXB, but it has issues with Interfaces and Generics. What solution is least intrusive but scalable?

mbx
- 6,292
- 6
- 58
- 91
7
votes
3 answers
XML deserialization crashes on decimal parse due to formatting
I get a System.FormatException thrown when i try to parse XML into an object. As far as I can tell, it's due to the culture used in System.Xml.Serialization.XmlSerializer.Deserialize, wich expects a dot as the decimal character, but the xml contains…

Softnux
- 2,440
- 4
- 20
- 21
7
votes
1 answer
Deserialize xml into super class object with C#
I'm creating a program that allow user define formulas with on 4 basic operation: add, subtract, divide, multiple using XML. Let's take an example: User want to define formula like (a + b) x (c + d). The format of the xml as following:
EDIT I had…

Doan Cuong
- 2,594
- 4
- 22
- 39
7
votes
3 answers
SAP Simple Transformation with arbitrary XML tags
I have XML of unknown structure and I want to apply ST (Simple Transformation) on it to get "somehow" that content out of XML into ABAP structures.
For now I have following test report:
report ztbu_st_with_copy.
data: lf_xml type…

Tom Burger
- 655
- 8
- 15