Code generation problem for VB with xsd.exe and attributes and elements with the same name within a

EDN Admin

Well-known member
Joined
Aug 7, 2010
Messages
12,794
Location
In the Machine
Im trying to generate VB classes from HL7 V3 CDA xsd schemas, and im running into an issue. There are a few types in the schema that contain an attribute and an element with the same name, but with different case. As a result xsd.exe is generating
the class with 2 different properties with the same name because VB is not case sensitive. So for example, a type has an element named id and an attribute named ID. The fields being generated are both named ID which is an error. This problem
doesnt happen in C# because it generates the 2 properties with their respective cases. Is there any way around this so that I dont have to mess with the xsd file or the generated code?
Thanks

View the full article
 
Back
Top