Rajeshkumar Kandhasamy
Rajeshkumar Kandhasamy

Reputation: 6461

Escape sequences in XML

I'm getting an Exception due to special characters when Xml is accessed by client enter image description here

Can any one help me...?

Upvotes: 0

Views: 357

Answers (4)

Roger F. Gay
Roger F. Gay

Reputation: 1961

You can include XML's special characters in XPL. XPL is structured exactly like XML but allows the special characters. The XPL to XML conversion utilities will take care of all the details for you. http://hll.nu

Upvotes: 0

Rajeshkumar Kandhasamy
Rajeshkumar Kandhasamy

Reputation: 6461

I have found my mistake in my case while opening/reading the XML i'm getting the error because of three symbols. So need to replace the Character: <>& by EntityName: &lt;&gt;&amp;. Then only the parsing error will not be displayed.

Click Here to see HTML Symbol Entities Reference

Click Here to Read XML Basic Generation

In other scenario instead symbols the Entity names need to be replaced then only parsing exception will not be displayed.

Upvotes: 0

Moritz Petersen
Moritz Petersen

Reputation: 13057

You need to set the correct encoding, and make sure the XML document is created with the same encoding.

<?xml version="1.0" encoding="INSERT ENCODING HERE"?>

Upvotes: 1

munyengm
munyengm

Reputation: 15479

You will need to ensure the special characters are enclosed within CDATA sections:

<![CDATA[
some special characters here
]]>

Upvotes: 1

Related Questions