By using this site, you agree to our updated Privacy Policy and our Terms of Use. Manage your Cookies Settings.
446,341 Members | 1,395 Online
Bytes IT Community
+ Ask a Question
Need help? Post your question and get tips & solutions from a community of 446,341 IT Pros & Developers. It's quick & easy.

Problem while loading an xml file

P: 4
I am facing one problem on loading the xml file

The code is

1. XML file
//attribute.xml
<?xml version="1.0" encoding="UTF-8"?>
<person>
<name>sandeep</name>
<address state="Goa �D; Panjim" distt="madgaon"/>
</person>

2.
through javascript loading the xml file

function functionx()
{
var xml=new ActiveXObject("Microsoft.XMLDOM");
xml.load("E://workspace//Test//Pages//xml//attribute.xml");
var x=xml.parseError.errorCode
alert(" Error reason: " + xml.parseError.reason);
}

When this JavaScript method is called
Error: An invalid character was found inside an entity reference

Comes out.

Could anybody suggest the solution for that...

The application require attribute value of an xml be �D;
If �D; should be replaced with space or anything else, the application works fine

Regards
sandeep
Oct 14 '08 #1
Share this Question
Share on Google+
3 Replies


Dormilich
Expert Mod 5K+
P: 8,639
&#0D; is not a valid Entity because this is in decimal notation. hexadecimal notation would be &#xD;, decimal &#13;.
Oct 14 '08 #2

P: 4
�D; is not a valid Entity because this is in decimal notation. hexadecimal notation would be &#xD;, decimal .

Thanks for yr reply.
is both are used for new line character OR carriage return?? And one more query which type of machine supports hexadecimal and which type supports decimal systems?

Regards:
sandeep
Oct 15 '08 #3

Dormilich
Expert Mod 5K+
P: 8,639
Thanks for yr reply.
is both are used for new line character OR carriage return?? And one more query which type of machine supports hexadecimal and which type supports decimal systems?
both ( and &#xD;) are the entities for the carriage return character. new line is more of a general name for the platform dependend characters CR (U+000D), LF (U+000A) and NEL (U+0085).

every reasonable (or Unicode aware) system has to support at least the decimal notation.

regards
Oct 15 '08 #4

Post your reply

Sign in to post your reply or Sign up for a free account.