Generate a xml file
Hello, i want to generate a new xml file with the values insert by the user. The format of xml file is this:
<?xml version="1.0" encoding="UTF-8"?>
<!--
Document: pcx.xml
Version: 0.6
Created on : 07 March 2007, 10:20
Author: francesco
Description: example of a PCX file
-->
<pcx version="1.0">
<!-- Information block with meta-information aboutthis file -->
<information>
<author>Francesco</author>
<date>2006/05/01</date>
</information>
<!-- Add an inline gdx. -->
<gdx>
<!--
Withinthis tag it's possible to define elements as
in the proper gdx file.
-->
</gdx>
<!-- Component-instances section. -->
<model>
<componentinstance refid="OptimizationComponent">
<parameterinstance refid="machines" value="opt_machine_list.txt" />
<parameterinstance refid="mu" value="5" />
<parameterinstance refid="lambda" value="8" />
<parameterinstance refid="generations" value="11" />
<parameterinstance refid="minimization" value="3" />
<parameterinstance refid="maximization" value="3" />
<parameterinstance refid="outputFolder" value="./out" />
<attributeinstance refid="fullMachinesListFilename" value="full_machines.txt" />
</componentinstance>
<componentinstance refid="VRMLViewerComponent">
<parameterinstance refid="filename" />
</componentinstance>
<componentinstance refid="GNUPlotComponent">
<parameterinstance refid="filename" />
</componentinstance>
</model>
<!--
Define the application GUI.
Every place rapresents a specific extension point of the application gui.
-->
<gui>
<!-- Menu of the GUI. -->
<place id="mainMenu" type="menu">
<!--
Subplaces of a menu-type place are, by default, menus, so we don't need to
specify their type.
-->
<place id="settings" caption="Settings">
<actioninstance refid="showParameterPanel">
<param name="component" value="OptimizationComponent" />
</actioninstance>
<!--
The following two actions have been added in order to have a uniform behavior
between components on theinterface but they are not really needed because it's
not possible to set any parameters on the two components.
-->
<actioninstance refid="showParameterPanel">
<param name="component" value="VRMLViewerComponent" />
</actioninstance>
<actioninstance refid="showParameterPanel">
<param name="component" value="GNUPlot" />
</actioninstance>
</place>
<place id="run" caption="Run">
<place caption="Optimization Component">
<actioninstance refid="startOptimization" refcomponent="OptimizationComponent"/>
<actioninstance refid="stopOptimization" refcomponent="OptimizationComponent"/>
</place>
</place>
<place id="monitor" caption="Monitor">
<place caption="Optimization Component">
<actioninstance refid="showWFX" refcomponent="OptimizationComponent"/>
</place>
</place>
<place id="results" caption="Results">
<place caption="Optimization Component">
<actioninstance refid="viewVRML" refcomponent="VRMLViewerComponent"/>
<actioninstance refid="plotXY" refcomponent="GNUPlotComponent"/>
</place>
</place>
</place>
<!--
Visual commands specificfor the OptimizationComponent block:
they'll be provided on the interface through buttons.
-->
<place id="optCommands" type="commands" refcomponent="OptimizationComponent">
<actioninstance refid="startOptimization" refcomponent="OptimizationComponent"/>
<actioninstance refid="stopOptimization" refcomponent="OptimizationComponent"/>
<actioninstance refid="viewVRML" refcomponent="VRMLViewerComponent" />
<actioninstance refid="plotXY" refcomponent="GNUPlotComponent" />
</place>
</gui>
</pcx>
The user can change the values from a JFrame that i have created. After this i want to store the values inserted by the user in a new xml file.
In fact is the same file of example but the values are not the same.
Can you help me?
Sorry for bad english...

