List Info

Thread: special chars in xml




special chars in xml
user name
2006-11-20 15:08:27

Hello,

 

I am new to the list and pretty new to perl tough I have a fair experience in programming.. I joined because former collegues of mine were listed here. They left me with an XML problem, which is that special characters are not exported to xml correctly??

I need to make an xml file which is imported by the customer.

Examples:

¡°test &¡± translates into ¡°<Description>test &amp;&lt;/Description> (xml correct and import correct)

¡°test ¨¦¡± translates into ¡°<Description>test ´¿Description>¡± (You see my problem here I guess)

 

Preencoding the string ¡°test ¨¦¡± into ¡°test &eacute;¡± translates into ¡°test &amp;eacute;¡± which doesn¡¯t get imported correctly;

If the &amp would not have been converted the import would fail, an &eacute; is not valid it appears.

Encoding each character in an &#...; chars also results in the & being encoded in &amp; If this would not happen the import would work fine.

 

Can anyone help me?

 

Marijn

 

[1]

about | contact  Other archives ( Real Estate discussion Medical topics )