we are having a problem if xml having <?Pub Caret?> at end of the file, we want to move the pi instruction, before last element or start of last row,
we are able to do on save using command caret -1,0. In case open what will be event handler to use same command to change the cursor location.
Duplicate question. See answer here