I have some translation files which are XML documents, which contain some
cdata elements:
...
<entry>
<base>ACTIVATE</base>
<trans>Activate</trans>
</entry>
<entry>
<base>UNREG_DESC</base>
<trans>
<![CDATA[
To obtain more information about blah, please visit our website
<A HREF="
http://www.domain.com/" TARGET=_top>
http://www.domain.com/</A>
]]>
</trans>
</entry>
...
I'm trying to turn this into a hash from which I can look up the
translations:
my %lexicon = map
{ $entry->base->content => $entry->trans->content}
$dom->find('lexicon entry')->each;
but then I find that $lexicon{UNREG_DESC} gives me '<![CDATA[ ...' when I
want 'To obtain more information ...'. I think I need to initialise a new
Mojo::DOM object with ''<![CDATA[ ...' but I can't figure out what to do
next. Hints please.