locked
Blackberry Browser Issue… Error encountered during XML parse: expecting a name RRS feed

  • Question

  • User-267673232 posted

    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

    Friday, January 27, 2012 4:15 AM

Answers

  • User1943143334 posted
    Hi,
    Try HtmlEncode!
    Server.HtmlEncode("&HelloWorld")
    Hope it helps u...
    • Marked as answer by Anonymous Thursday, October 7, 2021 12:00 AM
    Tuesday, January 31, 2012 8:32 AM

All replies

  • User1508394307 posted

    An ampersand & must be encoded in xml as & (not related to BB only). Try to validate your document at http://validator.w3.org.

    Friday, January 27, 2012 10:28 AM
  • User1943143334 posted
    Hi,
    Try HtmlEncode!
    Server.HtmlEncode("&HelloWorld")
    Hope it helps u...
    • Marked as answer by Anonymous Thursday, October 7, 2021 12:00 AM
    Tuesday, January 31, 2012 8:32 AM
  • User-267673232 posted

    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...

    <script type="text/javascript">
    <!--
    window.location = "http://www.google.com/?Search='Rick'&Name='Rick'"
    //-->
    </script>

    How to handle the & issue in javascript....

    Sunday, February 5, 2012 1:08 AM
  • User1943143334 posted

    Hi,

    & - is the query string separator!

    You don't need to worry about that!

    Hope it helps u...

     

    Sunday, February 5, 2012 6:00 AM
  • User1508394307 posted

    How to handle the & issue in javascript....

    It should work like this. The issue with & was about XML.

    Sunday, February 5, 2012 10:10 AM