Need to Edit 30 XML Files in Bulk

Discussion in 'Scripting' started by Windows Fan, Nov 26, 2012.

  1. Windows Fan

    Windows Fan MDL Senior Member

    Mar 6, 2012
    352
    211
    10
    i have 30 xml files and i want to edit them in bulk to replace 4 lines in each of them.

    the lines have following format:

    <administrator>
    <setting> some text </setting>
    <action> some text </action>
    </administrator>

    i want to replace the whole paragraph with following:

    <user>
    <options> none </options>
    <command> some text </command>
    </user>

    so basically i want to replace existing text with new text but 3rd line requires the text within tags unchanged.

    can anyone pls help? any batch script or software?
     
  2. Windows Fan

    Windows Fan MDL Senior Member

    Mar 6, 2012
    352
    211
    10
    thnx to forum member LostED i was able to accomplish the task. :)
     
  3. stevemk14ebr

    stevemk14ebr MDL Senior Member

    Jun 23, 2010
    267
    48
    10