"Re: [xml] Please help..."



Hi,


Tyushin Vadim (forsys) wrote:
maybe I don't undestand something.
 
I am trying to use libxml2(v2.6.2) with russian language.
Forming xmlDoc, I have placed THE SAME text ("??? ????") as node's value 
and attribute's value. Of course I remember about "utf-8" coding and was 
using it to load "??? ????" into xmlDoc.
 
Then tryed to dump xmlDoc into the file with this call:
xmlSaveFormatFileEnc("Test.xml", doc, "windows-1251")
 
That's what i got as resault:
 
<?xml version="1.0" encoding="windows-1251"?>
<RootNode>
  <Rus Attr="&#x420;&#x443;&#x441; &#x442;&#x435;&#x441;&#x442;">??? 
????</Rus>
</RootNode>
 
The value of "Rus" node is OK: "??? ????"
But the value of "Attr" attribute is displayed in fugures: 
"&#x420;&#x443;&#x441; &#x442;&#x435;&#x441;&#x442;"
 
What can I do to see "Attr" value also in letters?

I ran into the same problem. You may want to read the thread 
"serialization to UTF-16LE" from 2003-11-03. The values of attributes 
are serialized in a different way than text data, including the encoding 
mechanism. Daniel stated that changing this requires modifying the 
serializer code. The issue is already bugzilled.

Greetings,

Kasimier




[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]