How to edit Python script using Dom Modifiers?

Python String Operations

Operations are recorded by saving the XML representation of the dialog in the session file. This is referred to as DOM node. After a script is created, users can modify the arguments to the operation by modifying the DOM node. This can be done as shown below.

Entity Input

FaceIDs=simlab.getEntityFromGroup("Face_Group");
FaceIDs=str(FaceIDs).strip("()");

DeleteEntity=''' <DeleteEntity CheckBox="ON" UUID="BF2C866D-8983-4477-A3E9-2BBBC0BC6C2E">
        <tag Value="-1"/>
        <Name Value=""/>
        <SupportEntities>
        <Entities>
        <Model>Sample.gda</Model>
        <Face>'''+FaceIDs+'''</Face>
        </Entities>
        </SupportEntities>
        </DeleteEntity>''';
simlab.execute(DeleteEntity);

Body Input

Bodies=simlab.getBodiesFromGroup("Body_Group"); 
Bodies=str(Bodies).replace("'",'"').strip("()");

DeleteEntity=''' <DeleteEntity CheckBox="ON" UUID="BF2C866D-8983-4477-A3E9-2BBBC0BC6C2E">
        <tag Value="-1"/>
        <Name Value=""/>
        <SupportEntities>
        <Entities>
        <Model>Sample.gda</Model>
        <Body>'''+Bodies+'''</Body>
        </Entities>
        </SupportEntities>
        </DeleteEntity>''';
simlab.execute(DeleteEntity);

Group Input

Groups=simlab.getGroupsWithSubString("FaceGroup",["Face*"]);
Groups=str(Groups).replace("'", '"').strip("()");

DeleteEntity=''' <DeleteEntity CheckBox="ON" UUID="BF2C866D-8983-4477-A3E9-2BBBC0BC6C2E">
        <tag Value="-1"/>
        <Name Value=""/>
        <SupportEntities>
            <Group>'''+Groups+'''</Group>
        </SupportEntities>
        </DeleteEntity>''';
simlab.execute(DeleteEntity);