Hi everyone.
I need help. I'm supposed to have my program edit an XML field.
The user has the option to change the values in certain nodes.
After the node values have been filled in, and a certain button has been clicked, the program should write the changes to the file.
Here's the origional XML file:
<?xml version="1.0" ?>
- <APOLLERSETTINGS>
- <SYSTEM>
<VERSION>3.1</VERSION>
<SMTPSRV>blue</SMTPSRV>
<SMTPPORT>29</SMTPPORT>
<SMTPUSR>Me</SMTPUSR>
<SMTPPSW>Password</SMTPPSW>
<EMAILFROM>lodewyk.duminy@gmail.com</EMAILFROM>
<EMAILTO>lodewyk.duminy@gmail.com</EMAILTO>
<ALTEMAILTO>lodewyk.duminy@gmail.com</ALTEMAILTO>
</SYSTEM>
- <JOB>
<JOBNAME>The Name</JOBNAME>
<INPUTFOLDER>C:\</INPUTFOLDER>
<FILEMASK>*.txt</FILEMASK>
<PROCESSORDER />
<RETAINFOLDER>C:\</RETAINFOLDER>
<OVERRIDEFOLDER>C:\</OVERRIDEFOLDER>
<ERRORFOLDER>C:\</ERRORFOLDER>
<POLLINTERVAL>6000</POLLINTERVAL>
<JOBBATCHFILEPATH>C:\</JOBBATCHFILEPATH>
<JOBBATCHPARAMS>three</JOBBATCHPARAMS>
<JOBLOGPATH>C:\</JOBLOGPATH>
<JOBEMAILTO>lodewyk.duminy@gmail.com</JOBEMAILTO>
<JOBALTEMAILTO>lodewyk.duminy@gmail.com</JOBALTEMAILTO>
</JOB>
- <JOB>
<JOBNAME>Second job</JOBNAME>
<INPUTFOLDER>C:\</INPUTFOLDER>
<FILEMASK>*.xml</FILEMASK>
<PROCESSORDER>BACKWARDS</PROCESSORDER>
<RETAINFOLDER>C:\</RETAINFOLDER>
<OVERRIDEFOLDER>C:\</OVERRIDEFOLDER>
<ERRORFOLDER>C:\</ERRORFOLDER>
<POLLINTERVAL>200 000</POLLINTERVAL>
<JOBBATCHFILEPATH>C:\</JOBBATCHFILEPATH>
<JOBBATCHPARAMS>none</JOBBATCHPARAMS>
<JOBLOGPATH>C:\</JOBLOGPATH>
<JOBEMAILTO>lodewyk.duminy@gmail.com</JOBEMAILTO>
<JOBALTEMAILTO>lodewyk.duminy@gmail.com</JOBALTEMAILTO>
</JOB>
</APOLLERSETTINGS>
My problem is that there can be many <JOB></JOB> sets. THe only unique value they have is <JOBNAME></JOBNAME>.
1) How, if there are more than 1 <JOB></JOB> groups, do I find the right one (<JOBNAME></JOBNAME> is unique).
2) What should I use the write a value in a node,