Skip to main content
Filter by
Sorted by
Tagged with
0 votes
3 answers
82 views

I used to have simple classes like below: public class Product { public Money Price {get; set;} } public class Money { public decimal Amount {get; set;} public CurrencyEnum Currency {get;set;...
Ceres's user avatar
  • 73
-3 votes
2 answers
110 views

I have two classes public class Base { public int val { get; set; } = 10; } public class Derived : Base { public int val2 { get; set; } = 20; } Then in the main code I have: XmlSerializer ...
Perry's user avatar
  • 1,231
0 votes
0 answers
74 views

I want to use XML serializers as output formatters for ASP.NET Core web controller returning an IAsyncEnumerable<Movie>. The async streaming works fine when using System.Text.Json (.NET 9.0). If ...
AWanderer's user avatar
  • 145
1 vote
1 answer
215 views

I have a .net framework project that needs to be build The Project.XmlSerializers.dll. It was using the old style csproj file format and I converted to the new SDK style project. I then added the ...
Billy's user avatar
  • 419
0 votes
0 answers
36 views

I am using the following code to add namespace to my XmlSerializer to add the following namespaces. The class: [XmlRoot(ElementName = "TS332")] public class TS332Model { } Adding the ...
Ivan's user avatar
  • 9
1 vote
1 answer
57 views

I have been having problem with deseriailizing XML code genereated by XmlSerializer when child classes are used. The UnknownAttribute and UnknownNode events triggers and I assumed there was an error ...
qnyz's user avatar
  • 505
2 votes
0 answers
136 views

When I try to deserialize a generic class that contains init-only setters, I get the following exception: System.InvalidOperationException: 'There is an error in XML document (2, 2).' Inner Exception:...
Ryan W's user avatar
  • 136
1 vote
1 answer
191 views

Why use xsd.exe tool to create class for XSD schema and then use serializer to create XML file, when you can use XDocument. Should I be always using XDocument and manually create the XML document by ...
Nikola's user avatar
  • 138
0 votes
1 answer
55 views

I am trying to receive a request in WCF. I need to respond with a MessageContract, therefore I need to take a MessageContract as input. I cannot alter the input SOAP request and must accept it as is....
Spencer Sullivan's user avatar
0 votes
0 answers
183 views

I realize this same kind of question has been asked previously by some people. But solutions in those haven't really helped me. My problem currently is that I have XML messages where for example ...
BladeZ's user avatar
  • 217
1 vote
1 answer
69 views

I'm trying to use XmlSerializer.Deserialize() for my XML file. This is the code: private void LoadSceneDialogues() { if (dialogueXML != null) { sceneDialogues = new Dictionary<int, ...
Dalim Oh's user avatar
0 votes
1 answer
104 views

I have an object like this: public partial class CableApplication : StateObject { [System.Diagnostics.CodeAnalysis.SuppressMessage("Microsoft.Usage", "CA2214:...
nnmmss's user avatar
  • 3,052
-1 votes
1 answer
141 views

i got the following XSD: <xsd:complexType name="typeADDRESS"> <xsd:sequence> <xsd:element ref="NAME" minOccurs="0" maxOccurs="unbounded&...
Hans Mackowiak's user avatar
3 votes
0 answers
81 views

I have an event handler for XmlSerializer's UnknownAttribute event. This fires correctly if I have the following document: <Document> <Test unknown="attribute"> ... ...
alanbi's user avatar
  • 211
0 votes
0 answers
97 views

I've been attempting to perform XML deserialization involving a nested object into a C# class without using attributes. The XML element is "Man," while the corresponding C# class is named &...
Zik's user avatar
  • 1
0 votes
0 answers
34 views

I have 2 classes. A base class and a extended class that inherit from this base class. When I want to serialize the extended class the order isn't correct. public class BaseClass { [XmlElement(&...
Proliges's user avatar
  • 361
0 votes
0 answers
51 views

I have a custom serializable generic collection, defined (a simplified example) like this: [Serializable] public class ArrayOfItems<T> : IEnumerable<T> { [XmlAttribute("Setting&...
ElDog's user avatar
  • 1,417
0 votes
0 answers
59 views

I am trying to serialize a class with a field containing another class, but the field name appears in the XML. I have the following classes: public class CustomExpression { [XmlAttribute] public ...
SSave's user avatar
  • 1
1 vote
1 answer
87 views

I have an xml supplied by an external source. I have no say in their design or function. I can reach the initial branch and read the values as needed. I fear editing as I can't access any of the other ...
UserSpecialMinds's user avatar
1 vote
1 answer
109 views

I'm trying to find a simple way to deserialize compile-time known element to [Serializable()] class while reading XML where the elemnt itself is not the member of the class (any more). In short, I'm ...
Gorc's user avatar
  • 13
0 votes
1 answer
87 views

I am trying to use XmlSerializer to serialize/deserialize SyncML. I am having difficulty with the pattern which occurs in the <Get> tag as shown below: <SyncML xmlns="SYNCML:SYNCML1.2&...
Zenilogix's user avatar
  • 1,413
0 votes
0 answers
38 views

I have an old XML data file: <tag1> <subtag1>a string</subtag1> <subtag2>NIL</subtag2> <subtag3>14/06/2023</subtag3> </tag1> <tag1> <...
Fariz Awi's user avatar
0 votes
0 answers
25 views

I have a problem with serialization c# in .net public class User { public int Id { get; set; } public string Name { get; set; } public string Email { get; set; } } Is possible to control ...
Radamanthys's user avatar
0 votes
1 answer
531 views

php Symfony serializer - Deserialize xml to array of objects How deserialize xml with attributes to array of objects? $string = '<?xml version="1.0" encoding="UTF-8" ?> <...
Kanat's user avatar
  • 3
1 vote
2 answers
88 views

Here is what I tried but I get this error: Error CS0029 Cannot implicitly convert type 'ListBoxAndDictionary.CountriesAndCities' to 'System.Collections.Generic.Dictionary<string, System....
alphabeta's user avatar

1
2 3 4 5
30