Can I use Applescript to go to the end of a text document?
This will work-- it operates on the current TextWrangler document. Change "XYZ" to whatever you want.

tell application "TextWrangler"
    set the_text to text of document 1
    set text of document 1 to the_text &amp; return &amp; "&lt;em&gt;XYZ&lt;/em&gt;"
end tell