使用Netbeans从XSD创建示例XML [英] Use Netbeans to Create Sample XML from XSD
问题描述
如何使用Netbeans从XSD生成示例XML文件?我看到这个问题已经问过,并且看来可以解决.不过,有一些报告使得它看起来似乎不可能.
How do you use Netbeans to generate a sample XML file from an XSD? I see that this question has been asked before and it would appear that it can be done. Though, there are some reports that make it seem it cannot.
该选项位于哪个菜单或窗口下?我查看了每个菜单下的内容,并搜索了插件.我的Netbeans版本: NetBeans IDE 7.0.1(内部版本201107282000)
What menu or window is the option located under? I have looked under every menu as well as searched the plugins. My version of Netbeans: NetBeans IDE 7.0.1 (Build 201107282000)
推荐答案
来自包含.xsd
的项目:
- 点击工具栏上的
New File
或从菜单中选择File > New File
- 选择
XML > XML Document
- 命名您的文件,然后单击下一步
- 选择
XML Schema-Constrained Document
,然后单击下一步 - 单击
Browse
按钮,然后使用By File
导航到.xsd
- 单击文件名旁边的
Import
复选框,然后单击下一步 - 查看可用选项,然后单击
Finish
生成
- Click
New File
on the tool bar orFile > New File
from the menu - Choose
XML > XML Document
- Name your file, click next
- Choose
XML Schema-Constrained Document
, click next - Click the
Browse
button and useBy File
to navigate to the.xsd
- Click the
Import
check box beside the file name, click next - Review the options available and click
Finish
to generate
您可以使用多个.xsd
文件来生成.xml
.在这种情况下,它将使用您选择作为Primary
的任何.xsd
文件来解决任何冲突.
You can use more than one .xsd
file to generate the .xml
. In this case it will use whichever .xsd
file you choose as Primary
to resolve any conflicts.
这篇关于使用Netbeans从XSD创建示例XML的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!