Ok i have decided to manually create the XML in the format i want. Now i juest have a question about adding elements.
My
test main code below outputs xml, in the format i want, but all the data is not being outputted. The setAttribute method only allows one value to be set, while i want more than one line of xml to have attributes set.
for example my outputted xml is:
<?xml version="1.0" encoding="UTF-8"?>
<problem>
<parameters>
<parameter name="3" value="3" />
</parameters>
</problem>
when i really want it to look like:
<?xml version="1.0" encoding="UTF-8"?>
<problem>
<parameters>
<parameter name="1" value="1" />
<parameter name="2" value="2" />
<parameter name="3" value="3" />
</parameters>
</problem>
My code is as follows, all help appreciated.
Best
Mark Hughes