I am creating a Mobile website using Asp.net and i am facing a XML related issue in BB Browser I am using a Repeater control on my form and the data which is binding the repeater control contains ampersand "&" and it leads to an issue on BlackBerry Browser....
Below is the issue of the image.
After searching on the issue i figure out "ampersand" is the issue so how to handle "&" in data. The Repeater contains Vendor name which is " A & B " so it leads to crash
Rick Jackson (Please mark as answer if my post help you to solve your issue) [Happy programming]
rickjackson
Participant
1362 Points
405 Posts
Blackberry Browser Issue… Error encountered during XML parse: expecting a name
Jan 27, 2012 08:15 AM|LINK
I am creating a Mobile website using Asp.net and i am facing a XML related issue in BB Browser I am using a Repeater control on my form and the data which is binding the repeater control contains ampersand "&" and it leads to an issue on BlackBerry Browser.... Below is the issue of the image.
After searching on the issue i figure out "ampersand" is the issue so how to handle "&" in data. The Repeater contains Vendor name which is " A & B " so it leads to crash
smirnov
All-Star
23694 Points
4053 Posts
Re: Blackberry Browser Issue… Error encountered during XML parse: expecting a name
Jan 27, 2012 02:28 PM|LINK
An ampersand & must be encoded in xml as & (not related to BB only). Try to validate your document at http://validator.w3.org.
roopeshreddy
All-Star
20155 Points
3328 Posts
Re: Blackberry Browser Issue… Error encountered during XML parse: expecting a name
Jan 31, 2012 12:32 PM|LINK
Server.HtmlEncode("&HelloWorld")</div> <div>Hope it helps u...</div>Roopesh Reddy C
Roopesh's Space
rickjackson
Participant
1362 Points
405 Posts
Re: Blackberry Browser Issue… Error encountered during XML parse: expecting a name
Feb 05, 2012 05:08 AM|LINK
Hello to all, and thanks for your reply..... Roopesh thanks for your solution... I have 1 more query..
I added querystring using javascript like this...
How to handle the & issue in javascript....
roopeshreddy
All-Star
20155 Points
3328 Posts
Re: Blackberry Browser Issue… Error encountered during XML parse: expecting a name
Feb 05, 2012 10:00 AM|LINK
Hi,
& - is the query string separator!
You don't need to worry about that!
Hope it helps u...
Roopesh Reddy C
Roopesh's Space
smirnov
All-Star
23694 Points
4053 Posts
Re: Blackberry Browser Issue… Error encountered during XML parse: expecting a name
Feb 05, 2012 02:10 PM|LINK
It should work like this. The issue with & was about XML.