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
3
votes
3 answers

C# XML Insert comment into XML after xml tag

I am using a C# object to Serialize/Deserialize XML. I would like to add a comment to the XML file whilst serializing, this comment will be a basic after the standard xml tag This comment does…
Mark Redman
  • 24,079
  • 20
  • 92
  • 147
3
votes
3 answers

AvalonDock Not rendering layout when using default layout serialization and deserialization

i am just getting started with AvalonDock and i have been beating my head on the wall for a few days now. I am trying to do the mundane task of loading my layout from the de-serialized dockingmanager. I have attempted what ("AvalonDock…
Trae Moore
  • 1,759
  • 3
  • 17
  • 32
3
votes
3 answers

Can't Deserialize XML

I am trying to deserialize the following XML:
user1477388
  • 20,790
  • 32
  • 144
  • 264
3
votes
1 answer
3
votes
5 answers

Can't seem to deserialize very simple xml using XmlSerializer in c#

I feel like I am going made. I have written a hundred deserializing routines, but this one is killing me! Below is what I get returned from a service. A very simple array of strings...I think.
NER1808
  • 1,829
  • 2
  • 33
  • 45
3
votes
2 answers

There is an error in XML document; EndElement is an invalid XmlNodeType when deserializing

Consider a .NET client calling into a remote XML SOAP web service that's defined as a Web Reference. The client calls the service, and is attempting to deserialize the return XML into an object. The web method is executing properly, and the XML…
p.campbell
  • 98,673
  • 67
  • 256
  • 322
3
votes
0 answers

Webservice testing using SoapUi - Error with Deserialization and XmlNode[]

I am trying to perform a quick testing for a webservice created by a third party. The problem is whenever I use SoapUI, i am running in to the following error: Element MyValue from namespace http://schemas.datacontract.org/2004/07/Services cannot…
3
votes
2 answers

Unable to generate a temporary class (result=1). error CS0030: Cannot convert type

Identical symptoms to those in this post Basic symptoms are that when I use xsd.exe to create my C# class from my XML, when I attempt to deserialize it, I get this error (it compiles, but produces the error on runtime). Unable to generate a…
SuperSooty
  • 81
  • 4
  • 9
3
votes
2 answers

Message serialized with XmlMessageFormater refuses to deserialize List member

I'm having a frustrating time with C# message serialization. I have a class which has a constructor which looks like this: public ProposalRequestMessage(int imaNumber, int proposalId, bool trainingFlag, string firstSiteAddress, …
RikSaunderson
  • 3,505
  • 6
  • 32
  • 50
3
votes
1 answer

How to deserialize only part of a large xml file to c# classes?

I've already read some posts and articles on how to deserialize xml but still haven't figured out the way I should write the code to match my needs, so.. I'm apologizing for another question about deserializing xml )) I have a large (50 MB) xml…
Aleksei Chepovoi
  • 3,915
  • 8
  • 39
  • 77
3
votes
1 answer

Can we update existing xml files using xmlserializer?

Just wondering if we can update an already built xml file using xml serialization/deserializtion in C#? Also, if the file has initially only root node, can we update it with child nodes? (regardless of methods?)
Pankaj Parag
  • 437
  • 1
  • 6
  • 17
3
votes
1 answer

How to deserialize this xml with repeating XMLNodes

The webresponse i got from a server is shown like this. I am able to deserialze few values. But i dont kow how to convert the Availabilty to an Array. sold
Anand
  • 291
  • 3
  • 13
3
votes
2 answers

Deserialization fail when using themida protection

As the title says the deserialization fail after protecting my application with themida with the following exception : Unable to generate a temporary class (result=1). error CS0009: Metadata file 'c:\Path\to\protected.exe' could not be opened --…
Late4Work
  • 71
  • 5
3
votes
3 answers

Why DataContract is faster than Serializable?

I tried to make the serialization and deserialization of a custom object using the code below. [Serializable] public class TaskProperty { public int Id { get; set; } public DateTime ScheduleTime { get; set; } public TimeSpan…
enzom83
  • 8,080
  • 10
  • 68
  • 114
3
votes
1 answer

XML Deserialization without a namespace

I'm having a bit of trouble deserializing an XML that doesn't have a namespace. The odd thing is that I'm getting an exception saying "There is an error in XML document (2,2)."; Inner Exception "command_strings xmlns = was not expected.". I'm coding…
Miguel
  • 1,157
  • 1
  • 15
  • 28