473,390 Members | 1,728 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

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

output encoding with perl XML::LibXML


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 1107

This thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

by: Vlajko Knezic | last post by:
Not so sure what is going on here but is something to do with the way UTF8 is handled in Perl and/or LibXML The sctript below: - accepts a value from a form text field; - ...
by: Dan | last post by:
Using XML::Simple in perl is extreemly slow to parse big XML files (can be up to 250M, taking ~1h). How can I increase my performance / reduce my memory usage? Is SAX the way forward?
by: John Bokma | last post by:
Hi, After some attempts using XSLT I am thinking about switching to Perl with a SAX (like?) parser. Which module(s) should I use? I see so many XML related modules at search.cpan.org that it...
by: Iain | last post by:
Folks, I'm having a problem with charset encodings that I desparately need some help with. I don't even pretend to know the basics about charsets, so please forgive my ignorance. I am...
by: Jesse Thompson | last post by:
Greetings fell XML folk. I've just gotten started making SAX filters in Perl. I was hoping to build an XML templating engine this way, but the performance of XML::SAX::Expat and XML::SAX::Writer...
by: bugbear | last post by:
I need to process some XML files that are rather large. However their structure may usefully be expressed as <ELEMENT FILE (RECORD)+> .. .. .. Each record is a few Kb. The files are many...
by: kellner | last post by:
Hello, I'm parsing a chunk of XML code and would like to add attribute values to individual tags if these are lacking. This is with perl 5.8.6, libxml2 2.6.17, XML::LibXML 1.58. Basically, I...
by: lnatz | last post by:
I need to parse a configuration file using xml. How do I retrieve the data between the elements? For example, if my configuration file was organized in the following manner: <configFile>...
by: saumalatha | last post by:
Someone please help me how to use xsl in perl. Currently i am using XML::LIBXML, is there any method to use xsl with this module. I am not ready to use any new modules.
by: Charles Arthur | last post by:
How do i turn on java script on a villaon, callus and itel keypad mobile phone
by: ryjfgjl | last post by:
In our work, we often receive Excel tables with data in the same format. If we want to analyze these data, it can be difficult to analyze them because the data is spread across multiple Excel files...
by: emmanuelkatto | last post by:
Hi All, I am Emmanuel katto from Uganda. I want to ask what challenges you've faced while migrating a website to cloud. Please let me know. Thanks! Emmanuel
by: nemocccc | last post by:
hello, everyone, I want to develop a software for my android phone for daily needs, any suggestions?
by: Sonnysonu | last post by:
This is the data of csv file 1 2 3 1 2 3 1 2 3 1 2 3 2 3 2 3 3 the lengths should be different i have to store the data by column-wise with in the specific length. suppose the i have to...
by: Hystou | last post by:
There are some requirements for setting up RAID: 1. The motherboard and BIOS support RAID configuration. 2. The motherboard has 2 or more available SATA protocol SSD/HDD slots (including MSATA, M.2...
by: marktang | last post by:
ONU (Optical Network Unit) is one of the key components for providing high-speed Internet services. Its primary function is to act as an endpoint device located at the user's premises. However,...
by: Hystou | last post by:
Overview: Windows 11 and 10 have less user interface control over operating system update behaviour than previous versions of Windows. In Windows 11 and 10, there is no way to turn off the Windows...
by: tracyyun | last post by:
Dear forum friends, With the development of smart home technology, a variety of wireless communication protocols have appeared on the market, such as Zigbee, Z-Wave, Wi-Fi, Bluetooth, etc. Each...

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.