471,356 Members | 1,676 Online
Bytes | Software Development & Data Engineering Community
Post +

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 471,356 software developers and data experts.

output encoding with perl XML::LibXML

Hello,

I hesitated a lot before posting this topic here, but it seems more appropriate
than posting it in c.l.perl.

I would like to know how to change output encoding when using the
perl wrapper for LibXML, i. e. XML::LibXML. I have searched the documentation
and the web but cannot find any solution:

Whenever I make a DOM access to a document and serialize a node to a string, it
is returned as if no encoding was given for the doc; therefore, no character
entity is resolved, which is not what I want.

e. g., once parsed, <note id="_2852" id-ref="_2851">pléonastique</note>
returns <note id="_2852" id-ref="_2851">pl&#xE9;onastique</note>

I tried to change the document encoding by playing with the "setEncoding" method
of the "Document" object. This works for Document object, but not for any node
that would be extracted from it with a DOM access method.

I would be pleased if anyone could help.

--
nicolas //
Aug 16 '05 #1
0 1033

This discussion thread is closed

Replies have been disabled for this discussion.

Similar topics

1 post views Thread by Vlajko Knezic | last post: by
8 posts views Thread by Dan | last post: by
1 post views Thread by John Bokma | last post: by
13 posts views Thread by Jesse Thompson | last post: by
5 posts views Thread by bugbear | last post: by
9 posts views Thread by lnatz | last post: by
1 post views Thread by saumalatha | last post: by

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.