Provides custom formatting for XML serialization and deserialization.
Questions tagged [ixmlserializable]
115 questions
4
votes
3 answers
Serialize type into XML from .NET
I have this C# 4.0 type
public class DecimalField
{
public decimal Value { get; set; }
public bool Estimate { get; set; }
}
I want to use XmlSerializer to serialize the type into
123
Ideally, I want to omit the…

user1044169
- 2,686
- 6
- 35
- 64
4
votes
1 answer
Will implementing IXMLSerializable create a serializer DLL file in my Temp directory?
Normally, when using the XMLSerializer to automagically serialize an ISerializable object, a .dll file is generated on C:\WINDOWS\Temp.
If I implement IXMLSerializable instead, where I'm telling it how to serialize / deserialize, will it also…

Daniel Magliola
- 30,898
- 61
- 164
- 243
3
votes
2 answers
C# XML serialization type of IXmlSerializable
I want to serialize and deserialize an object like this:
public class Root
{
public string title;
[XmlArray("lista")]
[XmlArrayItem("Parameter")]
public List lista;
}
public class Parameter : IXmlSerializable
{
public…

Daniele Mereu
- 115
- 1
- 8
3
votes
4 answers
c# Deserialize with IXmlSerializable
I have xml like this:
2
6,501698000000
8,414278000000
9,292674000000
8,551982000000
…

Oleg L
- 161
- 1
- 14
3
votes
0 answers
Handling custom datacontract serialization in WCF Rest endpoint
I want to uses XML attributes instead of elements in xmlrequest and xmlresponse, I implemented IXmlSerializable as follows:
public partial class Id : IXmlSerializable
{
///
[XmlAttribute]
public string lmsId;
///…

Bobby Nagendra
- 31
- 1
3
votes
1 answer
Implementing IXmlSerializable on a generated class that has XmlTypeAttribute
Basically, the initial problem is I need to make a boolean value serialize as 0 or 1. The solution I found was to implement IXmlSerializable, which I did. Unfortunately the class I'm trying to serialize is generated code off a schema and has an…

Josh Sterling
- 838
- 7
- 12
3
votes
0 answers
XmlSerialization of IXmlSerializable array
I have a scenario where the Request objects are XML Serailized and sent back to a TCP server for getting processed. The serialization is done by a legacy framework. Needless to say, I can't make changes in the legacy framework.
The legacy framework,…

James
- 1,213
- 2
- 15
- 26
3
votes
1 answer
Should domain objects implement IXmlSerializable?
I'm building a REST API that exposes data as XML. I've got a whole bunch of domain classes in my domain layer that are intended for consumption by both the service layer behind the API, and the client API that we will be providing to customers.…

csano
- 13,266
- 2
- 28
- 45
3
votes
1 answer
Implementing IXmlSerializable Requires Collection Property to Have Setter
I have a collection property that is of a custom type which inherits from BindingList. Currently, this property gets serialized via XmlSerializer even though it has no Setter. I now am trying to implement IXmlSerializable on this custom collection…

Deviant Spark
- 31
- 2
2
votes
1 answer
OmitXmlDeclaration in XmlWriter and implementing IXmlSerializable
I want to create custom xml serialization by implementing IXmlSerializable.
I've got this test class that implements IXmlSerializable interface:
[Serializable]
public class Employee : IXmlSerializable
{
public Employee()
{
Name =…

user970694
- 139
- 1
- 3
- 8
2
votes
1 answer
XmlSerializer saves null-file
I have a problem with serializing my objects.
I implemented IXmlSerializable interface and initialize object of XmlSerializer(for example, serializer).
But sometimes after calling serializer.Serialize(writer, data) my output file looks like this:…

Developex
- 328
- 5
- 11
2
votes
1 answer
serialize and store object in another object that implements IXmlSerializable
I would like to XML serialize instances of my object Exception and store it in the XMLNode[] Nodes property of another object ExceptionReport.…

capdragon
- 14,565
- 24
- 107
- 153
2
votes
0 answers
XMLDeserialize, "There was an error reflecting type"
Possible Duplicate:
XmlSerializer - There was an error reflecting type
XmlSerializer ser = new XmlSerializer(typeof(configType));
There was an error reflecting type 'MyNameSpace.configType'.
I'll pare away at configType some more in the hope…

John
- 6,433
- 7
- 47
- 82
2
votes
1 answer
IXmlSerializable ReadXml implementation
I am trying to get the name of an XML tag into a class property when performing XML deserialization. I need the name as a property since multiple XML tags share the same class. The XML and associated classes are defined below.
I have an XML response…

elusive
- 460
- 5
- 24
2
votes
0 answers
Is it possible to extract unknown namespace declaration at runtime using XmlSerializer?
Is there a way to re-write this code using an IXmlSerializable, or better yet, via custom attributes?
// TODO: how to harvest the namespaces from the request using a model and XmlSerializer?
var xmlStr = await Helper.Post (uri, request);
var xml =…

Corey Alix
- 2,694
- 2
- 27
- 38