I am trying to serialize and deserialize objects in silverlight, but cannot seem to get it to work. Serializing works just fine but it complains about my rootObject not being expected. I don't get it because it it is Silverlight who generated the XML.
Btw; i'm still new to C#
I have a class which looks like:
[XmlRoot("DataStorage")]...
I have a problem deserializing some XML; the XML supplied by a third party is quite verbose, so if there is no value set for an particular element, it will supply and empty element (e.g. <element1 />).
This is a problem for certain elements, for example, those that are meant to store integers. I have control over the third party, so I c...
Hello,
I inherited a data-storage which was using simple text-files to save documents.
Documents had some attributes (date, title, and text), and these were encoded in a filename: <date>-<title>.txt, with the body of the file being the text.
However in reality Documents in the system have many more attributes, and even more again were...
I am trying to Deserialize the XML input which i get. I have Created Classes for Deserialization. In my XML input there is a DOCTYPE tag which specifies the DTD.
So the problem is, if i remove the DTD tag from the input (using substring) it gets Deserialized but if i dont remove it it gets stuck at
requestObject = (Request)serializer....
Here is my attempt, xsd and classes created from xsd.exe
Running my code I get error "There is an error in XML document (1, 2)." Inner exception {" was not expected."}
Any help would be greatly appreciated.
Thanks!
XML Snippet:
<xml>
<creditBureau xmlns="http://www.transunion.com/namespace"
xmlns:xsi="http://www....
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 XmlSerializer doesn't handle cyclic structures, I've added [XmlIgnore] to my Parent property, and ...
The Problem
I have an issue when I deserialize my xml, one of the child elements is not being deserialized. It is null in the class instance despite being populated in the xml.
A little Background
I used XsdObjectGenerator to create poco classes based on my .xsd. I was then able to deserialize the xml into a class instance and wo...
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 objects on authentic SOAP responses. I do not want to fire requests to the web service itse...
I am trying to access the node <accessmode> in the xml for a specific <action>.
<controller name="Job">
<roles>
<role>1</role>
<role>3</role>
<role>4</role>
</roles>
<actions>
<action name="Index">
<roles>
<role>1</role>
<role>4</role>
</roles>
<accessmode>1</accessmode>
</act...
I am using the Facebook-c-sharp to upload photos to Facebook. This code works fine but for new accounts of Facebook this code seems to have problem. I thought may be its something to do with the new privacy policies of Facebook and moreover authors of above code have stopped working on new releases.
The problem seems to be with creating ...
I have the following XElement
<Issue Type="Duplicate" Distance="1">
<Record>
<ID>6832</ID>
<Name_First>JAMES </Name_First>
<Name_Last>SMITH</Name_Last>
<Company>SMITH CO.</Company>
</Record>
<Record>
<ID>6831</ID>
<Name_First>JAMES</Name_First>
<Name_Last>SMITH</Name_Last>
<C...
I am a newbie to C#. I have a java REST service which returns a xml response and I am trying to deserialize the xml document using C# XmlSerializer. A sample xml document response is pasted below.
<?xml version="1.0" encoding="UTF-8"
standalone="yes" ?> <ns2:Document
xmlns:ns2="http://hxps.honeywell.com/model/impl"
xmlns:ns3="http:/...