xmlserializer Questions

4

Is it possible via any configuration option to tell JavaScript's XMLSerializer not to collapse empty tags into self-closing tags? I'm feeding an xml string into the xml parser then reserializing it...

6

Solved

I've got a very strange problem when working with .NET's XmlSerializer. Take the following example classes: public class Order { public PaymentCollection Payments { get; set; } //everything ...
False asked 9/8, 2012 at 15:0

6

Solved

I have an object Foo which I serialize to an XML stream. public class Foo { // The application version, NOT the file version! public string Version {get;set;} public string Name {get;set;} } ...
Crosson asked 12/9, 2011 at 9:42

9

Solved

I have a class PersonList [XmlRoot("Persons")] PersonList : List<Human> when I serialize this to XML, by default it will produce something like this: <Persons> <Human>...<...
Guarantee asked 18/2, 2010 at 21:52

3

Solved

I'm using XmlSerializer to serialize an object that contains a generic list List <ChildBase> Children {get;set} The problem is that each element derives from ChildBase which in fact is an abs...
Chic asked 29/10, 2009 at 11:41

4

Solved

Using a C# class generated from an XSD document, I can create an object, and serialize it successfully. However, some attributes have an XmlDefaultValue defined. If any objects have the default val...
Descendant asked 20/1, 2015 at 20:13

5

I have a base class with a virtual property and a derived type that overrides the virtual property. The type can be serialized to XML. What I am trying to do is NOT to persist the List of items pro...
Terzetto asked 11/3, 2011 at 15:35

2

Solved

I have defined type as Example as shown below, after instantiating a object and serializing using XmlSerializer, i am getting x003A instead of colon : Here's my code: public class Example { [X...
Bernoulli asked 10/12, 2017 at 10:23

6

Solved

I have been able to serialize an IEnumerable this way: [XmlArray("TRANSACTIONS")] [XmlArrayItem("TRANSACTION", typeof(Record))] public IEnumerable<BudgetRecord> Records { get { foreach(R...
Smyth asked 8/9, 2010 at 19:31

4

Solved

I am confused on how XmlSerializer works behind the scenes. I have a class that deserializes XML into an object. What I am seeing is for the following two elements that are NOT part of the Xml bein...
Rocco asked 27/7, 2017 at 18:50

6

Solved

I've been googling for the past few hours and trying different things but can't seem to the bottom of this.... When I run this code, the memory usage continuously grows. while (true) { try { ...
Asomatous asked 27/5, 2014 at 19:9

1

Solved

I tried xml_marshaller as follows: from xml_marshaller import xml_marshaller class Person: firstName = "John" lastName = "Doe" person1 = Person() strXmlPerson = xml_marshall...
Heterogeneity asked 26/6, 2020 at 23:20

1

As I am newbie in Android, I am building an application in which I need to update layer data on Geo server. For that scenario, I m calling post method along with XML body request. I need to send ...
Lifesaving asked 5/8, 2019 at 7:18

1

Solved

When generating an XML file with Serializer component (in Symfony4) I want to add a custom attribute to the root node but I can't figure out how to. The docs mention how to name the root node, but...
Unperforated asked 11/5, 2020 at 17:32

2

Solved

I'm trying to store user-input in an XML document on the client-side (javascript), and transmit that to the server for persistence. One user, for example, pasted in text that included an STX char...
Principally asked 2/2, 2013 at 18:54

1

Solved

I have some test code snippet: ​import groovy.xml.XmlUtil class Greet { Greet() { } def salute() { println "Hello !" def input = """ <manifest xmlns:android="http://schemas.android.com/a...
Justin asked 11/3, 2020 at 4:20

3

Solved

I'm looking for a way with C# which I can serialize a class into XML and add a namespace, but define the prefix which that namespace will use. Ultimately I'm trying to generate the following XML: ...

2

Solved

Summary .NET Core apps fail to XML serialize an object which contains an enum value, while .NET Framework (4.7.2) succeeds. Is this a known breaking change, and if so, how can I work around it? C...
Slurry asked 26/12, 2019 at 5:6

3

Solved

I am loading MusicXML-files into my program. The problem: There are two “dialects”, timewise and partwise, which have different root-nodes (and a different structure): <?xml version="1.0" encod...
Fame asked 14/5, 2014 at 19:19

2

I am trying to generate an XML document that contains the default namespace without a prefix using XmlSerializer, e.g. <?xml version="1.0" encoding="utf-8" ?> <MyRecord ID="9266" xmlns="...
Nutwood asked 23/3, 2010 at 13:16

3

Solved

I am trying to do a very simple bit of serialization with XmlSerializer: public struct XmlPerson { [XmlAttribute] public string Id { get; set; } [XmlAttribute] public string Name { get; set; } }...
Saddleback asked 23/4, 2012 at 13:50

0

This post https://mcmap.net/q/957285/-xmlserializer-validation gives a solution on how to validate an xml during deserialization. It also says that similar code can be written for serialization, bu...
Dampen asked 6/11, 2018 at 9:17

3

I took a memory dump of IIS and while analyzing i found the error that said 'Could not load file or assembly MyAssemblyName.XmlSerializers'. In my code i am using XmlSerializer class to seria...
Fourteen asked 19/7, 2013 at 21:10

4

Solved

I am trying to write an object to an Xml string and take that string and save it to a DB. But first I need to get the string... private static readonly Encoding LocalEncoding = Encoding.UTF8; pu...
Vallee asked 4/5, 2012 at 9:28

1

Solved

I'm trying to deserialize XML where some same name tags have different xsi types: <user-defined-data-row> <field name="entity"> <field-value xsi:type="field-text-valueType"> &...
Monobasic asked 23/5, 2018 at 9:5

© 2022 - 2025 — McMap. All rights reserved.