XML Create Schema converts integer to unsigned integer
I'm working on a library that uses the 37Signals Highrise API
Here's a sample of the XML response from a "Person" query...
<person>
<id type="integer">1</id>
<first-name>John</first-name>
<last-name>Doe</last-name>
<title>Stand-in</title>
<background>A popular guy for random data</background>
<company-id type="integer">5</company-id>
<created-at type="datetime">2007-02-27T03:11:52Z</created-at>
<updated-at type="datetime">2007-03-10T15:11:52Z</updated-at>
<visible-to>Everyone</visible-to>
<owner-id type="integer"></owner-id>
<group-id type="integer"></group-id>
<author-id type="integer">2</author-id>
I'm using Visual Studio 2010 to create an XML Schema so that I can use XSD to generate classes. All of the type="integer"
nodes are converted to xs:unsignedint in the schema. I don't want to use uint in my classes. Any idea why VS is doi开发者_如何学编程ng this?
Here's part of the generated schema, you can see author-id is set as integer in xml and unsigned integer in xml schema.
<xs:element name="author-id">
<xs:complexType>
<xs:simpleContent>
<xs:extension base="xs:unsignedInt">
<xs:attribute name="type" type="xs:string" use="required" />
</xs:extension>
</xs:simpleContent>
</xs:complexType>
</xs:element>
精彩评论