Previous: Example
Code: Generating Random XML |
You will find a main() method in the XmlRoundTrip that tells you how to input, validate, modify, and output valid FuGE-ML file compliant with the FuGE XSD generated by AndroMDA. (Further code that you can examine to see how to process the JAXB2-generated code can be found in RandomXmlGenerator >.) There are example command-line statments within the fuge-jaxb2/ sub-project inside readme.txt that will help you get started using this class. For example, you can use Maven2 to call a Java class: the benefit of this is that you will automatically make use of the Maven2 classpaths, and will not have to set something up yourself. An example command to run XmlRoundTrip is as follows:
cd fuge-jabx2/ mvn exec:java -Dexec.mainClass="net.sourceforge.fuge.util.XmlRoundTrip" -Dexec.args="src/main/resources/xmlSchema.xsd output0.xml roundtrip.xml"
If you spot something that needs adding or could be improved, please feel free to either contribute to the code yourself, or send a mail to fuge-devel@lists.sourceforge.net with your request.
If you modify this STK to generate a community extension, you will need to also modify this code to handle that extension.
Previous: Example
Code: Generating Random XML |