从 xsd 架构生成 ActionScript 值对象 [英] Generating ActionScript value objects from an xsd schema

查看:28
本文介绍了从 xsd 架构生成 ActionScript 值对象的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

是否有任何工具可用于将 xsd 架构中定义的类型(可能包括也可能不包括其他 xsd 文件)转换为 ActionScript 值对象?我已经在谷歌上搜索了一段时间,但似乎找不到任何工具,我在思考现在编写这样一个工具是否比简单地手动编写我们的值对象能节省更多时间.

Are there any tools available for transforming types defined in an xsd schema (may or may not include other xsd files) into ActionScript value objects? I've been googling this for a while but can't seem to find any tools and I'm pondering wether writing such a tool would save us more time right now than to simply code our value objects by hand.

我一直在考虑的另一种可能性是使用诸如 XMLBeans 之类的工具将模式定义的类型转换为 Java 类,然后在 ActionScript 中转换这些类.但是,我开始意识到有大量的 java -> as3 转换器,并且普遍的共识似乎是它们可以正常工作,即我不知道哪种工具适合.

Another possibility I've been considering is using a tool such as XMLBeans to transform the types defined by the schema to Java classes and then converting those classes in ActionScript. However, I've come to realize that there are about a gazillion java -> as3 converters out there and the general consesus seems to be that they sort of work, ie, I have no idea which tool is a good fit.

有什么想法吗?

推荐答案

对于 Java -> AS 生成,请查看 Granite Data Services 项目中的 GAS3:

For Java -> AS generation, check out GAS3 from the Granite Data Services project:

http://www.graniteds.org/confluence/display/DOC/2.+Gas3+Code+Generator

这也是您可以自己编写的类型,尤其是如果您利用 Ant 之类的工具并编写自定义任务来处理它.事实上,我去年就做了这个工作并将其开源:

This is the kind of thing you can write yourself too, especially if you leverage a tool like Ant and write a custom Task to handle it. In fact, I worked on this last year and open-sourced it:

https://github.com/cliffmeyers/Java2As

这篇关于从 xsd 架构生成 ActionScript 值对象的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆