I have the below xml file:
<?xml version="1.0" encoding="UTF-8"?>
<!--
This is a sample netbeans project file for a Squawk project.
You may edit it freely, it doesn't affect the ant-powered build.
-->
<project xmlns="http://www.netbeans.org/ns/project/1">
<type>org.netbeans.modules.ant.freeform</type>
<configuration>
<general-data xmlns="http://www.netbeans.org/ns/freeform-project/1">
<properties>
<property-file>${user.home}/.sunspot.properties</property-file>
<property-file>build.properties</property-file>
<property-file>${sunspot.home}/default.properties</property-file>
</properties>
<name>${application.title}</name>
<folders>
<source-folder>
<label>src</label>
<type>java</type>
<location>src</location>
</source-folder>
</folders>
<ide-actions>
<action name="build">
<target>jar-app</target>
</action>
<action name="run">
<target>deploy</target>
<target>run</target>
</action>
<action name="clean">
<target>clean</target>
</action>
<action name="rebuild">
<target>clean</target>
<target>jar-app</target>
</action>
<action name="javadoc">
<target>javadoc</target>
</action>
</ide-actions>
<export>
<type>folder</type>
<location>build</location>
<build-target>jar-app</build-target>
</export>
<view>
<items>
<source-folder style="packages">
<label>src</label>
<location>src</location>
</source-folder>
<source-file>
<location>build.xml</location>
</source-file>
</items>
<context-menu>
<ide-action name="build"/>
<ide-action name="rebuild"/>
<ide-action name="clean"/>
<ide-action name="javadoc"/>
<ide-action name="run"/>
<action>
<label>Build Project + Deploy to Sun SPOT</label>
<target>deploy</target>
</action>
<action>
<label>Deploy to Sun SPOT</label>
<target>jar-deploy</target>
</action>
<separator/>
</context-menu>
</view>
<subprojects/>
</general-data>
<java-data xmlns="http://www.netbeans.org/ns/freeform-project-java/1">
<compilation-unit>
<package-root>src</package-root>
<classpath mode="boot">${sunspot.bootclasspath}</classpath>
<classpath mode="compile">${sunspot.classpath}</classpath>
<built-to>build</built-to>
<source-level>1.4</source-level>
</compilation-unit>
</java-data>
<preferences xmlns="http://www.netbeans.org/ns/auxiliary-configuration-preferences/1">
<module name="org-netbeans-modules-editor-indent">
<node name="CodeStyle">
<property name="usedProfile" value="default"/>
<node name="project">
<property name="tab-size" value="8"/>
<property name="text-limit-width" value="80"/>
</node>
</node>
<node name="text">
<node name="x-java">
<node name="CodeStyle">
<node name="project"/>
</node>
</node>
</node>
</module>
</preferences>
</configuration>
</project>
I want to parse it with java and the Xstream library(serialize) in order to change the values of some properties and nodes and then deserilaze it on a file.But i find it difficult and not so convenient to make java classes to handle all these nodes(I have to make a java class for each node e.g:1 class for then 1 class for etc...).I found it a little bit waste of time.Is there any other way to do it faster with less code.Or maybe did i understand something wrong at the way that the library is working? Thanks