0

I have two questions that pertian to each other. I have to switch from XML Spy over to Sun Eclipse and there are some things that XML Spy does magically for me that I want to know if Eclipse can handle the same way:

  1. Given a sample XML document, generate a minimum XML Schema that it will comply with. It need not have type, occurrence or size restrictions, but it will have the structure. It will also take care of the element variations if present in the data, coming up with the greatest common structure.

  2. Given an XML Schema with all its included type declarations, generate a sample XML document, with options to have or not have the optional elements, to include one or many occurrences of repeated elements.

Any Help....

gary A.K.A. G4
  • 1,013
  • 8
  • 23
  • 36

1 Answers1

1

You can create a sample XML from an XSD file in Eclipse. Here are the instructions for the Juno version of Eclipse (with Web Tools Platform):

http://help.eclipse.org/juno/index.jsp?topic=%2Forg.eclipse.wst.xmleditor.doc.user%2Ftopics%2Ftcrexxsd.html

I'm not aware of a tool to go from an XML to an XSD file... you could search the Eclipse plugin market place for one...

Simon Arsenault
  • 1,241
  • 11
  • 12
  • I read through the help document, I do not have an option for Generate > XML in the right click menu. That is unfortunate, that would have solved the issue I am having – gary A.K.A. G4 Jun 04 '13 at 15:22
  • I found the solution. When creating a new XML file a wizard comes up, after choosing the location for the file, and naming it, click next and it will ask if you want to create the document from a source, such as an xsd or dtd. Next is to select the specific xsd or dtd, then you can choose to create attributes and elements, and the depth of the elements. – gary A.K.A. G4 Jun 04 '13 at 15:27