Quantcast
Channel: xsd2Code community edition .net class generator from XSD schema
Viewing all articles
Browse latest Browse all 543

Created Unassigned: Setters are generated for fixed elements [17636]

$
0
0
The following schema:

```
<xs:element name="user" type="xs:string" fixed="A" minOccurs="1" maxOccurs="1"/>
```

Results in the following generated code:

```
private string userField;
...
this.userField = "A";
...
public string user
{
get
{
return this.userField;
}
set
{
this.userField = value;
}
}
```

In fact, you can even set the value and serialize XML that doesn't meet the schema - though I guess that's more because the serializer doesn't know anything about the schema.

Viewing all articles
Browse latest Browse all 543

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>