You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
You're asking to have a dynamic value as the tag itself? That would mean the schema itself changes depending on the data. XML doesn't work that way.
However, you can use any arbitrary tag defined ahead of time but it must not depend upon the data.
You could use the YAXValueFor attribute in the containing object instead of creating a Person class.
public Record
{
[YAXSerializeAs("SSN-Value")]
public PersonSSN {get;set;} = "XXX-XX-XXXX";
[YAXValueForAttribute("SSN-Value#Name")]
public PersonName {get;set;} = "Guys Name";
}
For example, I have a class as follows:
I hope that can be serialized to:
<SSN-Value Name="Name-Value" />
The text was updated successfully, but these errors were encountered: