In this page, we're going to talk about a new feature that will help generate a sample XML document, given a schema.

Technical Problem

Netbeans IDE allows users to generate XML instance documents that conform to a given XML Schema. When a XML instance document is created that conforms to a XML schema, the IDE currently creates a skeletal XML instance document with only the root element. The user then needs to edit the document and use code completion to create a valid and well formed XML instance document. This is a time consuming process. Implementing this feature will allow users to automatically create XML instance document from XML schema with a given root element. Such a feature can be useful for many purposes: to design the schema iteratively by looking at the generated XML instance, to generate XML instances as test cases for applications that consume XML.

The new feature will meet the following requirements

  1. The generated XML document should be valid with respect to the schema. -- Will not be implemented for 6.1
  2. The generation should be deterministic—that is, the same schema will generate the same instance document.

Proposed Solution

An additional panel will be added to the XML instance creation wizard that will prompt the user to edit the options for XML content generation. The sample wizard panel is attached. This will help the user customize the way in which XML documents are generated from XML schemas

A context-sensitive menu option will also be added to XSD files. This option "Generate Sample XML" will create a sample XML based on the XSD in the same location as the XSD file in the project.

Detailed Description

<Detailed description if any>

Open Issues

<Limitations, open issues>

Not logged in. Log in, Register

By use of this website, you agree to the NetBeans Policies and Terms of Use. © 2012, Oracle Corporation and/or its affiliates. Sponsored by Oracle logo