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

Error deserializing object having a field of type declared in the other assembly loaded on AssemblyResolve

I have an application which embedes (via BuildAction: Embedded Resource) referenced assembly (called ClassLibrary1) inside itself and loads it on AppDomain.CurrentDomain.AssemblyResolve event. Main assembly defines a class Class1: public class…
2
votes
0 answers

XML attribute to indicate overwrite vs. preserve existing value

I could use a little guidance on working with XML. I'm working on a several XML interop specifications which will be used to create or update data in our system. I'd like to provide a way for my customers to specify which elements they want to…
dbstrat
  • 141
  • 1
  • 9
2
votes
2 answers

how to ask XSD.exe to generate proper class for me, so that i can create a fine XML

I have created an XSD file from Visual Studio 2010, Then I use xsd /c mydemo.xsd to generate class for me, so that I can create a XML file at runtime. However, when I use that class, fill in some values, and serialize the object, the XML file does …
jojo
  • 13,583
  • 35
  • 90
  • 123
2
votes
1 answer

Writing text to XML with XMLSerializer without escaping it

am trying to write text to an XML-File using the XMLSerializer. The text(String)-function escapes characters automatically. Is it possible not to escape text when adding it to the xml-File? If it is not possible, could you recommend an easy…
Display name
  • 2,697
  • 2
  • 31
  • 49
2
votes
1 answer

C# class from xml

I am using xsd to generate classes from an xml file. It is working ok but there is one part of the xml file that is not being generated as I would like. Here is a sample section of the xml: Stapler 1.50
Flack
  • 5,727
  • 14
  • 69
  • 104
2
votes
1 answer

Versioning of xml files and serialization to C# objects

I have a collection of POCOs that I am serializing to xml using the xmlserializer and streamwriter/streamreader. My xml file will be on the web for my app to get updates from. I am concerned that if version 2 of my app comes out and needs to change…
tim
  • 1,371
  • 3
  • 19
  • 30
2
votes
1 answer

JAXB, how to skip class tag when included

I'm trying to get that XML: thing other from that code public class Person { private InnerThing in; } public class InnerThing { private String foo; private String bar; } with JAXB java…
Esteban
  • 21
  • 1
2
votes
1 answer

C# Class for XML Serialization

First time, long time. I'm trying to write a C# class that when serialized, will form this SOAP XML string:
2
votes
0 answers

XML table editor

I need a 2D tables editor, that: Let's rename columns. Can save data as XML, using column names as tags, so it's possible to deserialize this XML and get collection of struct instances. Supports implicit typing for columns, and if column has no…
noober
  • 4,819
  • 12
  • 49
  • 85
2
votes
2 answers

How to xml serialize an event in C#

I have some events in a class. While I serialize them using NetDataContractSerializer, the events are not getting serialized. Is there any way I can xml serialize an event like BinarySerializer does?
Anindya Chatterjee
  • 5,824
  • 13
  • 58
  • 82
2
votes
5 answers

.Net: how do you convert a class properties to output xml element?

all. I seem to forgot the process and how to set a class property to xml element or attribute by setting attribute on the property member. So you can write out the object to xml. I'm not sure I'm making any sense here but hopefully someone know what…
Jack
  • 9,843
  • 23
  • 78
  • 111
2
votes
1 answer

Android, help with a simpleframework PersistenceException

I am trying to use org.simpleframework.xml. classes to handle xml data on my Android project. I can't understand how to build my class "Point" contructor to match the xml definition: at run-time I get this…
MarcoS
  • 17,323
  • 24
  • 96
  • 174
2
votes
3 answers

advice on choosing different binary xml tools

My requirement is to compress xml file into a binary format, transmit it and decompress it (lightening fast) before i start parsing it. There are quite a few binary xml protocols and tools available. I found EXI (efficient xml interchange) better as…
Nadeem
  • 75
  • 2
  • 11
2
votes
7 answers

What is the simplest and minimalistic java xml api?

There are many pretty good json libs lika GSon. But for XML I know only Xerces/JDOM and both have tedious API. I don't like to use unnecessary objects like DocumentFactory, XpathExpressionFactory, NodeList and so on. So in the light of native xml…
yura
  • 14,489
  • 21
  • 77
  • 126
2
votes
1 answer

How to map XML elements and attributes via JAXB annotations?

How does one map fields in JAXB annotations to elements and attributes? I'm having a bit of trouble trying to custom-tailor my model in JAXB. Here's my current model: Info.java: package com.rest.model; public class Info { private String a; …
Naftuli Kay
  • 87,710
  • 93
  • 269
  • 411