Velocity Reviews

Velocity Reviews (http://www.velocityreviews.com/forums/index.php)
-   Perl (http://www.velocityreviews.com/forums/f17-perl.html)
-   -   Perl Unicode (http://www.velocityreviews.com/forums/t24786-perl-unicode.html)

Hans Scholte 01-27-2004 10:36 AM

Perl Unicode
 
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




All times are GMT. The time now is 01:19 PM.

Powered by vBulletin®. Copyright ©2000 - 2014, vBulletin Solutions, Inc.
SEO by vBSEO ©2010, Crawlability, Inc.