使用Netbeans从XSD创建示例XML [英] Use Netbeans to Create Sample XML from XSD

查看:145
本文介绍了使用Netbeans从XSD创建示例XML的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

如何使用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的项目:

  1. 点击工具栏上的New File或从菜单中选择File > New File
  2. 选择XML > XML Document
  3. 命名您的文件,然后单击下一步
  4. 选择XML Schema-Constrained Document,然后单击下一步
  5. 单击Browse按钮,然后使用By File导航到.xsd
  6. 单击文件名旁边的Import复选框,然后单击下一步
  7. 查看可用选项,然后单击Finish生成
  1. Click New File on the tool bar or File > New File from the menu
  2. Choose XML > XML Document
  3. Name your file, click next
  4. Choose XML Schema-Constrained Document, click next
  5. Click the Browse button and use By File to navigate to the .xsd
  6. Click the Import check box beside the file name, click next
  7. 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屋!

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