Repository navigation
|
By default any "nonNegativeInteger" is being mapped to "string" but it needs to map to an "uint". What can I do with |
Answered by
mganss
Mar 25, 2026
Replies: 3 comments 1 reply
|
Use either |
0 replies
|
Thanks for the answer. I've tried and couldn't get that to do what I wanted it to do. Perhaps it's not possible? This is a demo XSD: xml version="1.0"?>
<schema xmlns="http://www.w3.org/2001/XMLSchema" xmlns:api-ns="test-com" targetNamespace="test-com" elementFormDefault="qualified">
<complexType name="TestSetType">
<attribute name="InstID" type="nonNegativeInteger" use="optional"/>
<attribute name="InstCode" type="string" use="optional"/>
<attribute name="InstName" type="string" use="optional"/>
complexType>
schema>This is the output of any of the following commands: xscgen --fallback .\test.xsd
xscgen --integer=uint .\test.xsd
xscgen --integer=uint --tns A:nonNegativeInteger=uint .\test.xsdnamespace Test.Com
{
[System.CodeDom.Compiler.GeneratedCodeAttribute("XmlSchemaClassGenerator", "3.0.1234.0")]
[System.SerializableAttribute()]
[System.Xml.Serialization.XmlTypeAttribute("TestSetType", Namespace="test-com")]
[System.Diagnostics.DebuggerStepThroughAttribute()]
[System.ComponentModel.DesignerCategoryAttribute("code")]
public partial class TestSetType
{
[System.Xml.Serialization.XmlAttributeAttribute("InstID")]
public string InstId { get; set; }
[System.Xml.Serialization.XmlAttributeAttribute("InstCode")]
public string InstCode { get; set; }
[System.Xml.Serialization.XmlAttributeAttribute("InstName")]
public string InstName { get; set; }
}
}I'm trying to get the |
0 replies
|
You're right, |
1 reply
Answer selected by
Boggin
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
You're right,
uintwasn't supported up to now. I've added supported for the missing integer types. You can now use-i uiforuint.