krisgroves
Programmer
Ok here is my delima.. I am not a scripter.. i know code well but i've never written anything script based.. Here's what i need.
I am basically needing a script that will go into a file structure and have it prefer a different parent and thus, change the file structure.
here's my XML code
<rc>
<id>A95FFA1AB64D0617E034080020BC3E71</id>
<name>BLUE RIDGE</name>
<state>SC</state>
<parentid>A95FFA1AB65E0617E034080020BC3E71</parentid>
<npanxxlist>
<npanxx>864663</npanxx>
<npanxx>864895</npanxx>
<npanxx>864896</npanxx>
<npanxx>864977</npanxx>
</npanxxlist>
</rc>
Here's what i need the script to make my XML code LOOK LIKE.
<rc>
<id>A95FFA1AB64D0617E034080020BC3E71</id>
<name>BLUE RIDGE</name>
<state>SC</state>
<parentid> A95FFA1AB67D0617E034080020BC3E71</parentid>
<npanxxlist>
<npanxx>864663</npanxx>
<npanxx>864895</npanxx>
<npanxx>864896</npanxx>
<npanxx>864977</npanxx>
</npanxxlist>
</rc>
The difference are very subtle, it's about 4-5 numbers in the id/parentid that differ. I will need to write a script that will be able to go in to the XML code above sort through about 15,000 files and change them automatically, anyone have any idea how to go about this?
I am basically needing a script that will go into a file structure and have it prefer a different parent and thus, change the file structure.
here's my XML code
<rc>
<id>A95FFA1AB64D0617E034080020BC3E71</id>
<name>BLUE RIDGE</name>
<state>SC</state>
<parentid>A95FFA1AB65E0617E034080020BC3E71</parentid>
<npanxxlist>
<npanxx>864663</npanxx>
<npanxx>864895</npanxx>
<npanxx>864896</npanxx>
<npanxx>864977</npanxx>
</npanxxlist>
</rc>
Here's what i need the script to make my XML code LOOK LIKE.
<rc>
<id>A95FFA1AB64D0617E034080020BC3E71</id>
<name>BLUE RIDGE</name>
<state>SC</state>
<parentid> A95FFA1AB67D0617E034080020BC3E71</parentid>
<npanxxlist>
<npanxx>864663</npanxx>
<npanxx>864895</npanxx>
<npanxx>864896</npanxx>
<npanxx>864977</npanxx>
</npanxxlist>
</rc>
The difference are very subtle, it's about 4-5 numbers in the id/parentid that differ. I will need to write a script that will be able to go in to the XML code above sort through about 15,000 files and change them automatically, anyone have any idea how to go about this?