I'm using XML::Writer to build an xml file to load our IBM websphere commerce database. The xml spec I have to use uses attributes for all the data, so i cannot use any cdata to preserve data. The problem I'm having is that some of the data I have already has some entities in it. For exampe: the copy right symbol is in my description in my database as ±

When I send that data through XML:Writer the ampersand gets transformed in the data to ±

Is there any way to make XML::Writer leave exiting entities alone? Here is a sample of the code that I am using to create an entry in my xml that has the problem...

$upd_xml->emptyTag('catentdesc', catentry_id => iu_product_catentry($part, $pi), language_id => $properties{language_id}{"en_$cntryid"}, name => $pi->{NEW_SHORTNAME}, shortdescription => $pi->{NEW_SHORTNAME}, longdescription => $pi->{NEW_LONGNAME}, fullimage => $pi->{NEW_DETAIL_IMAGE}, available => '0', published => ($pi->{NEW_ISRETIRED} or $pi->{NEW_ISINVISIBLE} +? '0' : '1'), keyword => $pi->{NEW_KEYWORDS});
Is there some 'feature' in XML::Writer that I am missing that can help me?

In reply to XML::Writer entity transformation issue by mifflin

Title:
Use:  <p> text here (a paragraph) </p>
and:  <code> code here </code>
to format your post, it's "PerlMonks-approved HTML":



  • Posts are HTML formatted. Put <p> </p> tags around your paragraphs. Put <code> </code> tags around your code and data!
  • Titles consisting of a single word are discouraged, and in most cases are disallowed outright.
  • Read Where should I post X? if you're not absolutely sure you're posting in the right place.
  • Please read these before you post! —
  • Posts may use any of the Perl Monks Approved HTML tags:
    a, abbr, b, big, blockquote, br, caption, center, col, colgroup, dd, del, details, div, dl, dt, em, font, h1, h2, h3, h4, h5, h6, hr, i, ins, li, ol, p, pre, readmore, small, span, spoiler, strike, strong, sub, summary, sup, table, tbody, td, tfoot, th, thead, tr, tt, u, ul, wbr
  • You may need to use entities for some characters, as follows. (Exception: Within code tags, you can put the characters literally.)
            For:     Use:
    & &amp;
    < &lt;
    > &gt;
    [ &#91;
    ] &#93;
  • Link using PerlMonks shortcuts! What shortcuts can I use for linking?
  • See Writeup Formatting Tips and other pages linked from there for more info.