Provides custom formatting for XML serialization and deserialization.
Questions tagged [ixmlserializable]
115 questions
1
vote
1 answer
Issue allowing custom Xml Serialization/Deserialization on certain types of field
I've been working with Xml Serialization/Deserialization in .net and wanted a method where the serialization/deserialization process would only be applied to certain parts of an Xml fragment. This is so I can keep certain parts of the fragment in…

sw1sh
- 93
- 1
- 6
1
vote
1 answer
Windows 8 store app XmlWriter does not write anything to file
I am not very well versed with .NET's XML libraries and trying to wrap my head around IXmlSerializable interface. I am developing a windows store app (W8) and wish to use the IXmlSerializable interface, however am running into issues. XmlTextWriter…

rookie .net dev
- 33
- 5
1
vote
1 answer
xsi and xsd namespaces missing when using custom IXmlSerializable
I am encountering the following problem. Whenever I use the default XML serialization in my C# class, the namespaces xsi and xsd are automatically added by the .NET serialization engine. However when the serialization is defined through…

Vlad
- 35,022
- 6
- 77
- 199
1
vote
1 answer
Finding References in IXmlSerializable
I am writing elements of a particular type into the outgoing xml using IXmlSerializable.
I have implemented the schema, and am writing the items out. The code that follows is an example.
public void IXmlSerializable.WriteXml(XmlWriter writer) {
//…

Jim
- 14,952
- 15
- 80
- 167
1
vote
1 answer
XMLSerialization doesn't set properties on de-serialization
I have a weird behavior, which I don't even know how to diagnose.
Some properties during de-serialization are not set (null), even though I clearly see them in the (just-produced) XML document. The XML document looks well structured and symmetric…

New Dev
- 48,427
- 12
- 87
- 129
1
vote
1 answer
Serialize XML elements as their class name
In a nutshell, I'm looking to create an XML schema from a set of objects that looks like the following;

DiskJunky
- 4,750
- 3
- 37
- 66
1
vote
1 answer
Serializing IXmlSerializable Types Using XmlSerializer in WCF
Thoroughly frustrated with the DataContractSerializer, I'm trying to get up and running in WCF using IXmlSerializable types with XmlSerializer.
I've implemented IXmlSerializable and XmlSchemaProvider in my class to be serialized and declared…

Tom Tom
- 423
- 4
- 9
1
vote
4 answers
What is the correct way to serialize nullable types?
I'm implementing IXMLSerializable in one of my classes. It contains a few numeric properties that are nullable (int? double? etc..)
What is the correct way to serialize/serialize these through IXMLSerializable? Here's what I'm doing now, which…

Eric Anastas
- 21,675
- 38
- 142
- 236
1
vote
2 answers
IXmlSerializable change xml tag names
I have class with collection as below
public class MyClass:IXmlSerializable
{
int vesrion;
private Collection testcoll;
}
to serialize it I have written WriteXML as below
public void WriteXml(XmlWriter writer)
{
…
user1427678
1
vote
1 answer
XmlAttributeOverrides further customization
XmlAttributeOverrides is a good way to override some attributes for serialization. MSDN says: You can control and augment the serialization of objects found in a DLL, even if you do not have access to the source
And I have a question is it possible…

iLemming
- 34,477
- 60
- 195
- 309
1
vote
1 answer
IXmlSerializable, reading xml tree with many nested elements
Could you guys give me an example how to read and write from/to xml like this:
…

iLemming
- 34,477
- 60
- 195
- 309
1
vote
2 answers
IXmlSerializable
Could you guys help me I have a problem with deserialization via IXmlSerializable
var ArrayOfAccounts = new Accounts(); //This class structure I'm trying to read
Class Accounts:List{ }
Class Shedule{
public DateTime StartAt { get; set;…

iLemming
- 34,477
- 60
- 195
- 309
1
vote
3 answers
Why this deserialized throws me StackOverflow exception?
When I try to deserialized my FooContainer (List) throws me an error. Please, just watch the last part of this code.
public interface IFoo
{
object Value { get; }
}
public abstract class Foo : IFoo
{
[XmlElement("Value")]
public T…

Darf Zon
- 6,268
- 20
- 90
- 149
1
vote
1 answer
SerializableAttribute or IXmlSerializable when serializing objects with large byte arrays
Following my recent issues with large object heap fragmentation, I've revisited some of my serializable classes. I frequently do some Xml serialization and serialize/deserialize objects containing large byte arrays.
In general I just use…

SiliconMind
- 2,185
- 4
- 25
- 49
0
votes
3 answers
WCF Dictionary implementing IXmlSerializable
I have some WCF services which employes default DataContractSerialization. Some of the service methods return Dictionary objects. One of the clients are generating XSD files from WCF services (biztalk related) and he is requesting to convert all…

daryal
- 14,643
- 4
- 38
- 54