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.

-- 
You received this message because you are subscribed to the Google Groups 
"Mojolicious" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to [email protected].
To post to this group, send email to [email protected].
Visit this group at http://groups.google.com/group/mojolicious.
For more options, visit https://groups.google.com/d/optout.

Reply via email to