我正在使用37Signals Highrise API
的库以下是“人物”查询的XML响应示例...
<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>
我正在使用Visual Studio 2010创建XML Schema,以便我可以使用XSD生成类。所有type="integer"
节点都在架构中转换为xs:unsignedint。我不想在课堂上使用uint。知道为什么VS这样做吗?
这是生成的模式的一部分,您可以看到author-id在xml中设置为整数,在xml模式中设置为无符号整数。
<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>