Hi, I wasn't calling doc.encodeSpecialChars() on contents so &'s weren't being encoded to & I had noticed that < and > and " were being handled so I thought it was happening automatically. Anyway - the script has been updated at: http://linux.duke.edu/~skvidal/metadata/generate/ Thanks -sv