#!/usr/bin/env xsh $file = open "myfile.xml"; insert comment "BOX1" replace //span[id="box1"]; save;