Skip to main content


Eclipse Community Forums
Forum Search:

Search      Help    Register    Login    Home
Home » Eclipse Projects » EclipseLink » [Moxy] How to efficiently create (valid) xml for given Schema
[Moxy] How to efficiently create (valid) xml for given Schema [message #1052920] Wed, 01 May 2013 11:59 Go to next message
moritz du is currently offline moritz duFriend
Messages: 102
Registered: February 2010
Senior Member
I have to create xml files ("Response") of format inside this zip.

I already have in place the moxy-generated jaxb-classes and a code snippet that creates a very bare xml (only root element with minimal set of attributes).

But what is a good approach to get at least some kind of skeleton to be filled only on some places?
If possible i don't want unnecessary elements/attributes in output but with a minimum in code (masses of setters).
the information for this is lieing in the xsd: in first step i want to create a xml with all mandatory elements and attributes. Is there a way doing this with moxy?

Re: [Moxy] How to efficiently create (valid) xml for given Schema [message #1058899 is a reply to message #1052920] Wed, 15 May 2013 15:30 Go to previous messageGo to next message
Blaise Doughan is currently offline Blaise DoughanFriend
Messages: 163
Registered: July 2009
Senior Member

I apologize for the delay in responding, this question came in while I was off for a few weeks for a new addition to the family.

MOXy does not provide a utility to generate a sample document based on an XML schema. For this kind of use case where you want to create some test documents you could use Eclipse. If you right click the XML schema in the Package Explorer you can choose the option

Generate | XML File...  

Then that wizard allows you to customize what the generated document should look like.
Re: [Moxy] How to efficiently create (valid) xml for given Schema [message #1058908 is a reply to message #1058899] Wed, 15 May 2013 17:12 Go to previous message
moritz du is currently offline moritz duFriend
Messages: 102
Registered: February 2010
Senior Member
thx - this is the way i do it. the problem is that eclipse does not create valid xml because it can not generate test data.
Previous Topic:[Moxy] Simple unmarshalling and marshalling changes xml
Next Topic:Version 2.5.0 on maven central?
Goto Forum:
  


Current Time: Fri Apr 26 02:27:39 GMT 2024

Powered by FUDForum. Page generated in 0.03454 seconds
.:: Contact :: Home ::.

Powered by: FUDforum 3.0.2.
Copyright ©2001-2010 FUDforum Bulletin Board Software

Back to the top