Questions tagged [xml-serialization]

This tag refers to serialization technologies which use XML as a data format.

This tag refers to serialization technologies which use XML as a data format. In the context of .NET, it refers to the XmlSerializer class, less so to the DataContractSerializer class, still less to the SoapFormatter class.

4687 questions
2
votes
4 answers

XML to objects for iPhone using wonderxml

Hey All! I am trying to use wonderxml (http://code.google.com/p/wonderxml/) to convert my xml into objective-c objects. It works for a simple case like below... XML: Test1 my address Corresponding Class…
hrishib
  • 23
  • 3
2
votes
1 answer

Serialising an XML element and XML array item of the same name

I want to serialise XML documents from a third-party service that either come in as any of the two formats (I added indenting for easier readability): 1. Invalid Request, no content provided! 2.
Key007
  • 143
  • 2
  • 10
2
votes
4 answers

Visual Xml to .net object mapper

Hi guys: I have to export my data, practically the entire domain model structure into a formal xml file. Does anyone know a visual tool that I can use to map an xml schema to my .NET object model?
Pita.O
  • 1,864
  • 1
  • 19
  • 27
2
votes
0 answers

"The type * was not expected. Use the XmlInclude or SoapInclude attribute to specify types that are not known statically."

In my WPF application, I have a DataGrid which grabs values from a database, these values are used as configuration parameters for the robotic components of a machine. I am trying to add a feature to Import/Export the values in the grid to/from an…
Cubemaster
  • 507
  • 1
  • 6
  • 20
2
votes
2 answers

Adding links to REST Responses

I have REST services that respond with unmarshalled domain entities. For example: Request: GET http://someAddress.com/customer/001 Response: 001 Some Guy ... I would like to add some links…
TERACytE
  • 7,553
  • 13
  • 75
  • 111
2
votes
1 answer

Sorting the output from XmlSerializer in C#

In this post, I could get an XML file generated based on C# class. Can I reorder the XML elements based on its element? My code uses var ser = new XmlSerializer(typeof(Module)); ser.Serialize(WriteFileStream, report,…
prosseek
  • 182,215
  • 215
  • 566
  • 871
2
votes
2 answers

Serialize text between XML nodes

I have this XML: Some text A Name some more text A value Whereas the contents is optional, there can be text in front, between or at the end, and node1 and node2 do not need to be…
2
votes
2 answers

Is there any way to control formatting of float/double in ASMX Web Services?

If I have the following simple class: [Serializable] public class Test { public double a = 0.0000001; } When I return an object of this type from a .NET ASMX Web Service, the response will be: 1E-07 which is, perhaps…
Marc Bollinger
  • 3,109
  • 2
  • 27
  • 32
2
votes
1 answer

How to Move Child Elements to Attributes of Parent Elements (XML)

I currently have an XML file that is rather large in size (roughly 800MB). I've tried some attempts (here is one dealing with compression) to work with it in its current condition; however, they haven't been very successful as they take quite some…
Hazel へいぜる
  • 2,751
  • 1
  • 12
  • 44
2
votes
3 answers

Custom serialization in JAXB

Is there a way to customize XML serialization in JAXB, in the same way that it's possible using IXmlSerializable in .NET? (i.e. the ability to directly control serialization of an object using the equivalent of an XmlReader/Writer). I've taken a…
Andy
  • 3,596
  • 8
  • 34
  • 33
2
votes
3 answers

Trying to serialize an object compactly using Castor

I'm using Castor to write out a map of user ID's to time intervals. I'm using it to save and resume progress in a lengthy task, and I'm trying to make the XML as compact as possible. My map is from string userID's to a class that contains the…
Chris Nash
  • 2,941
  • 19
  • 22
2
votes
2 answers

XmlSerializer Deserialize returns empty array

I'm trying to deserialize the following XML (excerpt): Waking The Demon Bullet For My Valentine
RajenK
  • 1,403
  • 3
  • 15
  • 25
2
votes
2 answers

How to produce XML with attributes rather than nodes, using MvcContrib's XmlResult?

I'm trying to generate an XML output from a type in C#. I'm Using the MvcContrib XmlResult class, which I've included a link to below. As a simple test to see if I could get it working, I'm using the following code: var topTen = new TopTen { …
DaveDev
  • 41,155
  • 72
  • 223
  • 385
2
votes
0 answers

Sending plain XML as value using System.ServiceModel.ClientBase

Hi I need to send plain XML via a ClientBase wcf client in an anomymous field. I used standard .Net Classes, but whatever I have tried, the output of the xml is ecaped
Steven
  • 1,444
  • 17
  • 23
2
votes
1 answer

Proper usage of XMLRootAttribute in Monotouch

I have a class called School that is serializable. When it serializes/deserializes I need the root element to be called school not School without having to change the class name to school. So I used the xmlroot attribute in the following…
KhalilD
  • 33
  • 3