XmlTextAttribute Support (Rudimentary)
See original GitHub issueIt seems like that XmlTyp(AnonymousType = true) is not supported.
public class ClassA
{
public string ElementA { get; set; } = "TextA";
public ClassB B { get; set; } = new ClassB();
}
[XmlType(AnonymousType = true)]
public class ClassB
{
public string ElementB { get; set; } = "TextB";
}
I want to prevent <B><ElementB>TextB</ElementB></B>
and just get <ElementB>TextB</ElementB>
inside ClassA. Is there another way to achieve this? I have to say, I don’t like the standard Xml Serializer solution, because if I need a class C which should have Class B fully inside and not just his members, then I have to create a duplicate class for B but without the “AnonymousType” tag, that’s why I would favour a member tag like XmlElement to be more flexible.
Issue Analytics
- State:
- Created 5 years ago
- Comments:20 (13 by maintainers)
Top Results From Across the Web
XmlTextAttribute Support (Rudimentary) · Issue #192
It seems like that XmlTyp(AnonymousType = true) is not supported. public class ClassA { public string ... XmlTextAttribute Support (Rudimentary) #192.
Read more >XmlTextAttribute Class (System.Xml.Serialization)
Indicates to the XmlSerializer that the member must be treated as XML text when the class that contains it is serialized or deserialized....
Read more >ProcessAttributes - Maple Help
The Allowable argument is a set of those attribute names, which are valid for xmlTree. •. ProcessAttributes can also perform rudimentary error checking...
Read more >Software – a geek trapped in a cool guy's body - Jason Kemp
One of the big things Microsoft has said about .NET, and it's true, is that it has built-in support for XML. There is...
Read more >The Intrusion Detection Message Exchange Format (IDMEF)
The XML standard requires support for both the UTF-8 and UTF-16 encodings of ISO/ ... The use of <AnalyzerTime> to perform rudimentary time...
Read more >Top Related Medium Post
No results found
Top Related StackOverflow Question
No results found
Troubleshoot Live Code
Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start FreeTop Related Reddit Thread
No results found
Top Related Hackernoon Post
No results found
Top Related Tweet
No results found
Top Related Dev.to Post
No results found
Top Related Hashnode Post
No results found
Top GitHub Comments
Holy moly! Have I been in a rabbit hole. I am just now getting my environment back online and being able to attend to this. I hope to have this resolved today or tomorrow. We’ll see how I do. 😛
Thank you Mike, you don’t need to hurry up, I’ll use XmlSerializer to get my stuff done and maybe I can switch to this framework later on and benefit from peformance gains 😃 Have a good day.