Generic php dom manipulator.