Added the "trim: false" option to the call to xmlparser.toJson. This allows <pre> elements to retain the correct formatting.