使用 JAXB 生成随机实例

发布于 2024-10-06 10:52:56 字数 217 浏览 1 评论 0原文

我使用 JABX 从大模式生成类树,然后读取/写入该模式的实例。

现在,为了保证我的应用程序的安全,我希望使用 JAXB(或其他一些工具)来生成该模式的许多随机实例,以便我可以将其提供给我的应用程序。 这样我就可以看到我的应用程序是否因某些输入数据而崩溃。

我期望 JAXB 仅具有每个节点的基数和默认值,能够为自己生成树的实例。

你认为JAXB可行吗?你还有其他想法吗?

I'm using JABX to generate a tree of classes from a big schema, and then read/write instances of this schema.

Now, to bullet-proof my application, I'd like to have JAXB (or some other tool) to generate many random instances of that schema, that I can feed in my application.
This way I would be able to see if my application crashes for some input data.

I'm expecting that JAXB, with only the cardinality and default values at each nodes, be able to generate itself an instance of the tree.

Do you think it's feasible with JAXB? Do you have other ideas?

如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。

扫码二维码加入Web技术交流群

发布评论

需要 登录 才能够评论, 你可以免费 注册 一个本站的账号。

评论(1

许你一世情深 2024-10-13 10:52:56

XMLBeans 有这样一个工具: xsd2inst

XMLBeans has such a tool: xsd2inst

~没有更多了~
我们使用 Cookies 和其他技术来定制您的体验包括您的登录状态等。通过阅读我们的 隐私政策 了解更多相关信息。 单击 接受 或继续使用网站,即表示您同意使用 Cookies 和您的相关数据。
原文