Say I have that file, and I just want to open it up, add ten to each number, then save it again with the new numbers, which module should I use and how?<data> <fields> <field name="foo"> <number>2</number> <required>Y</required> </field> <field name="bar"> <number>1</number> <required>N</required> </field> </fields> </data>
I'm finding it impossible to do with XML::Simple using what I thought would be the correct method, XMLout() and printing to a file, because it rearranges the data, no matter what fiddling I do with forcearray and keyattr options, for instance it will output as:
<opt> <fields name="field"> <foo required="Y" number="12" /> <bar required="N" number="11" /> </fields> </opt>
Can anyone give me a quick recipe for this? It's late in the day and I'm not thinking straight any more.
--
Every bit of code is either naturally related to the problem at hand, or else it's an accidental side effect of the fact that you happened to solve the problem using a digital computer.
M-J D
In reply to Edit values in XML and Save? by Cody Pendant
| For: | Use: | ||
| & | & | ||
| < | < | ||
| > | > | ||
| [ | [ | ||
| ] | ] |