XmlSchemaClassGenerator icon indicating copy to clipboard operation
XmlSchemaClassGenerator copied to clipboard

Custom/plural property name for implicit collections

Open las-nsc opened this issue 3 years ago • 1 comments

When you have a sequence without a surrounding element, the name of the XSD class is used, for example

<House>
  <Person Name="Mum"/>
  <Person Name="Dad"/>
  <Person Name="Son"/>
  <Person Name="Daughter"/>
  <Object Name="Bed"/>
  <Object Name="Sofa"/>
  <Object Name="Table"/>
  <Object Name="Bath"/>
</House>

Would generate 2 C# collections, but they will be called Person and Object rather than People and Objects

If we could specify a custom xsd attribute to override the name of this sequence collection, or embed it in a comment, that would be much better.

las-nsc avatar Mar 01 '22 15:03 las-nsc

This is similar to #159.

mganss avatar Mar 01 '22 16:03 mganss