Perl Unicode

H

Hans Scholte

Hi,

I'm parsing an XML file wich contains some unicode. When I'm reading a
textnode with a bit of unicode inside and keep it in a variable then, when I
try rereading the same textnode with the aid of the variable then I cannot
read back the node.
Let me try to explain:

I have the following xml document:
<doc>
<node>
<ID>id1</ID>
<value>value1</value>
</node>
<node>
<ID>....</ID
<value>foo / bar</value>
<node>
</doc>

the second ID element contains four bytes, representing some unicode.
$DOM represent the documentinstance

trying to preserve the ID value with $tmp =
$DOM->selectSingleNode('ID')->{'text'} leaves me with a smaller string then
the original four characters. I cannot re-read with
$DOM->selectSingleNode(ID[.="$tmp"])
Anybody any idea?

Hans
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Members online

Forum statistics

Threads
473,755
Messages
2,569,537
Members
45,020
Latest member
GenesisGai

Latest Threads

Top