Does anyone knows how can I configure inst2xsd to generate int
and not byte
(nor short
)?
-simple-content-types smar开发者_开发知识库t
(default) option.
see also their online docs.
10x, asaf :-)
Posting my solution, due to the high demand:
generateXSD.bat:
inst2xsd -outDir xsd -outPrefix mySchema my.xml
compile.bat:
scomp -compiler "path_to\javac" -src mySrcDir -out lib\mySchema.jar xsd\mySchema.xsd xsdconfig\my.xsdconfig
Ant target:
<target name="xbean">
<exec executable="cmd" dir="xbean">
<arg value="/c"/>
<arg value="generateXSD.bat"/>
<arg value="-p"/>
</exec>
<replace file="xbean/xsd/mySchema.xsd" summary="yes">
<replacefilter token="xs:byte" value="xs:int"/>
<replacefilter token="xs:short" value="xs:int"/>
</replace>
<exec executable="cmd" dir="xbean">
<arg value="/c"/>
<arg value="compile.bat"/>
<arg value="-p"/>
</exec>
</target>
Now back to me. I'm on a horse.
精彩评论