0

Im having some trouble reading xml files using jquery that containts swedish chars (åäö) in my xml.

It doesnt matter if i use

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

or

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

i will still get a parseerror in jquery. However, if i open the files in notepad++ and save with "utf-8 without BOM" it will work. But this is not an option, since i cant assume that all teh users will do that. How do i solve this? Thanks!

1 Answer 1

1

What is the parse-error you are receiving?

The most common issue with XML files not working correctly is caused by white space, so maybe worth checking this.

A useful URL is http://www.usingxml.com/Basics/XmlSpace

Thanks

Sign up to request clarification or add additional context in comments.

1 Comment

I am trimming all the whitespaces already. Should i replace the ö ä å with the ascii code? The error that jquery throws is DOM Exception: SYNTAX_ERR (12)

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.