473,324 Members | 1,678 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,324 software developers and data experts.

xml character references

I'm trying to read a xml-file with swedish characters (å, ä, ö). I know that
xml can't read this characters so I have replaced them with standard entities
(å ä ö) according to "ISO-8859-1".
http://www.w3schools.com/html/html_entitiesref.asp

But when I trying to read the xml-file I get "Entityreference is invalid"
Do you now any solution?

Nov 16 '05 #1
2 1721
Hi Jesper,
I'm trying to read a xml-file with swedish characters (å, ä, ö). I know that
xml can't read this characters so I have replaced them with standard entities
(å ä ö) according to "ISO-8859-1".
either

<?xml version="1.0" encoding="ISO-8859-1"?>

with ISO-8859-1 encoded umlauts (like those you just posted).

or

<?xml version="1.0" encoding="UTF-8"?>

with UTF-8 encoded umlauts.

http://www.w3schools.com/html/html_entitiesref.asp


These are HTML entities. Don't do that.

bye
Rob
Nov 16 '05 #2
Thanks, I got it working. It was HTML entities that was the problem. I'm
creating the xml-file from apache/php and somehow php wanted to store the
strings in HTML format.

"Robert Jordan" wrote:
Hi Jesper,
I'm trying to read a xml-file with swedish characters (å, ä, ö). I know that
xml can't read this characters so I have replaced them with standard entities
(å ä ö) according to "ISO-8859-1".


either

<?xml version="1.0" encoding="ISO-8859-1"?>

with ISO-8859-1 encoded umlauts (like those you just posted).

or

<?xml version="1.0" encoding="UTF-8"?>

with UTF-8 encoded umlauts.

http://www.w3schools.com/html/html_entitiesref.asp


These are HTML entities. Don't do that.

bye
Rob

Nov 16 '05 #3

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

Similar topics

0
by: Olav | last post by:
Resolving character references with C++/Arabica I have an element that looks like this: <PhoneNumber>&lt;NUMBER&gt;</PhoneNumber> I would like to have the content returned as "<NUMBER>". Not...
0
by: Jan van Mansum | last post by:
Hello group, I have the following problem. I am trying to write an XSLT source code formatter as an exercise. My problem is that the parser (Xalan in my case) expands the character references...
11
by: Albretch | last post by:
Hi HTML gurus, I understand that you would use HTML character entities for &auml; and &euro; but why on earth would anyone encode: a colon: ":", a semicolon ";", or a gramatical period...
76
by: Zenobia | last post by:
How do I display character 151 (long hyphen) in XHTML (utf-8) ? Is there another character that will substitute? The W3C validation parser, http://validator.w3.org, tells me that this character...
9
by: Safalra | last post by:
The idea here is relatively simple: a java program (I'm using JDK1.4 if that makes a difference) that loads an HTML file, removes invalid characters (or replaces them in the case of common ones...
1
by: Headless | last post by:
Are character references allowed in generated content, in other words should they be parsed by a UA? (Opera does, Moz doesn't) Headless
9
by: jmev7 | last post by:
I'm in the US, and have to constantly take data input from other countries. Some of this data has characters which I can't understand, since it's input from other language keyboards. This prevents...
40
by: Shmuel (Seymour J.) Metz | last post by:
I'd like to include some Hebrew names in a web page. HTML 4 doesn't appear to include character attributes for ISO-8859-8. I'd prefer avoiding numeric references, e.g.,...
18
by: R. P. | last post by:
I wonder how to indicate in a stylesheet that character entities in an element are not to be transformed as would be the case in XML-to-XML transforms. I want to keep those &amp; &quot; and other character...
5
by: Timothy Madden | last post by:
Hello Is there a function that will allow me to output text written in utf-8 (from db for example) if my document has Content-Type: text/html; charset=ISO-8859-1 I mean htmlspecialchars()...
0
by: ryjfgjl | last post by:
ExcelToDatabase: batch import excel into database automatically...
0
isladogs
by: isladogs | last post by:
The next Access Europe meeting will be on Wednesday 6 Mar 2024 starting at 18:00 UK time (6PM UTC) and finishing at about 19:15 (7.15PM). In this month's session, we are pleased to welcome back...
1
isladogs
by: isladogs | last post by:
The next Access Europe meeting will be on Wednesday 6 Mar 2024 starting at 18:00 UK time (6PM UTC) and finishing at about 19:15 (7.15PM). In this month's session, we are pleased to welcome back...
0
by: Vimpel783 | last post by:
Hello! Guys, I found this code on the Internet, but I need to modify it a little. It works well, the problem is this: Data is sent from only one cell, in this case B5, but it is necessary that data...
0
by: jfyes | last post by:
As a hardware engineer, after seeing that CEIWEI recently released a new tool for Modbus RTU Over TCP/UDP filtering and monitoring, I actively went to its official website to take a look. It turned...
0
by: ArrayDB | last post by:
The error message I've encountered is; ERROR:root:Error generating model response: exception: access violation writing 0x0000000000005140, which seems to be indicative of an access violation...
1
by: CloudSolutions | last post by:
Introduction: For many beginners and individual users, requiring a credit card and email registration may pose a barrier when starting to use cloud servers. However, some cloud server providers now...
1
by: Shællîpôpï 09 | last post by:
If u are using a keypad phone, how do u turn on JavaScript, to access features like WhatsApp, Facebook, Instagram....
0
by: Faith0G | last post by:
I am starting a new it consulting business and it's been a while since I setup a new website. Is wordpress still the best web based software for hosting a 5 page website? The webpages will be...

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.