开发者

XML Create Schema converts integer to unsigned integer

开发者 https://www.devze.com 2023-04-02 05:23 出处:网络
I\'m working on a library that uses the 37Signals Highrise API Here\'s a sample of the XML response from a \"Person\" query...

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>
0

精彩评论

暂无评论...
验证码 换一张
取 消

关注公众号