obj = root: '@att': 'attribute value with & and &' '#text': 'XML entities for ampersand are & and &.' suite 'Tests specific to issues:', -> test 'Issue #97 (No double encoding)', -> eq( xml(obj, { noDoubleEncoding: true }).end() '' + '' + 'XML entities for ampersand are & and &.' + '' ) test 'Issue #97 (Double encoding - default behavior)', -> eq( xml(obj).end() '' + '' + 'XML entities for ampersand are & and &.' + '' )