从 XML 模式 (xsd) 生成 XML 实例

XML instance generation from XML schema (xsd)(从 XML 模式 (xsd) 生成 XML 实例)
本文介绍了从 XML 模式 (xsd) 生成 XML 实例的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着跟版网的小编来一起学习吧!

问题描述

如果我有数据和标签,我想知道是否有一种方法可以自动从 XSD 模式生成 XML 文件.我想在 python/java 中执行此操作.这似乎很有可能,但我找不到任何允许我这样做的库.我正在寻找一个相当快速的解决方案..有什么想法吗?

I was wondering if there's a way I can automate the generation of XML files from XSD schemas given that I have the data and the labels. I'd like to do this in python/java. It seems very possible, yet I can't find any library that allows me to do this. I'm looking for a fairly quick solution.. Any ideas?

另请参阅:如何生成样本-xml-documents-from-their-dtd-or-xsd

推荐答案

看看 pyXSD 有没有类似的 Python 工具到 JAXB.

Look at pyXSD for Python tools that are similar to JAXB.

XSD 用于创建 Python 类.Python 对象用于发出 XML.

XSD's are used to create Python classes. Python objects are used to emit XML.

这篇关于从 XML 模式 (xsd) 生成 XML 实例的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持跟版网!

本站部分内容来源互联网,如果有图片或者内容侵犯您的权益请联系我们删除!

相关文档推荐

Android schema validation(Android 架构验证)
Required Multiple beans of same type in Spring(Spring中需要多个相同类型的bean)
How to deal with JAXB ComplexType with MixedContent data?(如何处理带有 MixedContent 数据的 JAXB ComplexType?)
Validate an XML File Against Multiple Schema Definitions(针对多个模式定义验证 XML 文件)
JAXB - Property quot;Valuequot; is already defined. Use lt;jaxb:propertygt; to resolve this conflict(JAXB - 属性“值;已经定义了.使用 lt;jaxb:propertygt;解决这个冲突)
Java API to parse XSD schema file(用于解析 XSD 模式文件的 Java API)