Error reading special character '{' hexadecimal value 0x7B in xml

Discussion in 'ASP .Net' started by =?Utf-8?B?UHVzaHBlbmRyYQ==?=, Jul 24, 2004.

  1. I am storing the encrypted password in xml file which I have saved in unicode format. While I try to read the xml file and create a dataset from it, it shows me the following error

    System.Xml.XmlException: The '{' character, hexadecimal value 0x7B, cannot begin with a name.
    The xml tag that I want to read is below:

    <DSNNAME>, ($»<{Å `Ê®A]]'Ã</DSNNAME>

    I will be very much thakful If someone writes about the solution for this problem.

    Regards,
    Pushpendra
     
    =?Utf-8?B?UHVzaHBlbmRyYQ==?=, Jul 24, 2004
    #1
    1. Advertising

  2. =?Utf-8?B?UHVzaHBlbmRyYQ==?=

    Shan Plourde Guest

    Re: Error reading special character '{' hexadecimal value 0x7B inxml

    Try surrounding your data with the XML CDATA tag:
    <DSNNAME><![CDATA[, ($»<{Å `Ê®A]]'Ã[[></DSNNAME>

    Shan Plourde

    Pushpendra wrote:

    >I am storing the encrypted password in xml file which I have saved in unicode format. While I try to read the xml file and create a dataset from it, it shows me the following error
    >
    >System.Xml.XmlException: The '{' character, hexadecimal value 0x7B, cannot begin with a name.
    >The xml tag that I want to read is below:
    >
    ><DSNNAME>, ($»<{Å `Ê®A]]'Ã</DSNNAME>
    >
    >I will be very much thakful If someone writes about the solution for this problem.
    >
    >Regards,
    >Pushpendra
    >
    >
    >
    >
    >
    >
    >
    >
     
    Shan Plourde, Jul 24, 2004
    #2
    1. Advertising

  3. =?Utf-8?B?UHVzaHBlbmRyYQ==?=

    Shan Plourde Guest

    Re: Error reading special character '{' hexadecimal value 0x7B in

    Hi Pushpendra
    My bad, my [[> syntax was wrong, true you need to use ]], not [[.

    One interesting thing that I noticed was in your error line #'s:

    With the invalid CDATA syntax, the error is at line 81, position 1.

    With the valid CDATA syntax, the error reported by the XML parser is at
    line 43. Maybe that's a clue to help you solve the issue...

    Pushpendra wrote:

    >Hi Shan,
    >I have tried your suggession but it's not working
    >I have tried surroinding the data with CDATA as:
    ><DSNNAME><![CDATA[, ($»<{Å `Ê®A]]'Ã[[></DSNNAME>
    >It shows:
    >
    >System.Xml.XmlException: An unexpected end of file parsing CDATA has occurred. Line 81, position 1.
    > at System.Xml.XmlScanner.ScanCData()
    > at System.Xml.XmlScanner.ScanMarkup()
    > at System.Xml.XmlTextReader.ParseTag()
    > at System.Xml.XmlTextReader.ParseBeginTagExpandCharEntities()
    > at System.Xml.XmlTextReader.Read()
    >
    >If I use CDATA in following Format:
    >
    ><DSNNAME><![CDATA[, ($»<{Å `Ê®A]]'Ã]]></DSNNAME>
    >
    >Then it shows me the following error:
    >
    >System.Xml.XmlException: The '{' character, hexadecimal value 0x7B, cannot begin with a name. Line 43, position 20.
    > at System.Xml.XmlScanner.ScanName()
    > at System.Xml.XmlScanner.ScanMarkup()
    > at System.Xml.XmlScanner.ScanToken(Int32 expected)
    > at System.Xml.XmlTextReader.SetElementValues()
    > at System.Xml.XmlTextReader.ParseElement()
    > at System.Xml.XmlTextReader.Read()
    > at System.Xml.XmlReader.GetTextContent()
    > at System.Xml.XmlReader.ReadString()
    >
    >
    >Any other suggession, I should try?? Please write.
    >
    >Pushpendra
    >
    >
    >
    >
    >
    >
    >
    >
    >
    >"Shan Plourde" wrote:
    >
    >
    >
    >>Try surrounding your data with the XML CDATA tag:
    >><DSNNAME><![CDATA[, ($»<{Å `Ê®A]]'Ã[[></DSNNAME>
    >>
    >>Shan Plourde
    >>
    >>Pushpendra wrote:
    >>
    >>
    >>
    >>>I am storing the encrypted password in xml file which I have saved in unicode format. While I try to read the xml file and create a dataset from it, it shows me the following error
    >>>
    >>>System.Xml.XmlException: The '{' character, hexadecimal value 0x7B, cannot begin with a name.
    >>>The xml tag that I want to read is below:
    >>>
    >>><DSNNAME>, ($»<{Å `Ê®A]]'Ã</DSNNAME>
    >>>
    >>>I will be very much thakful If someone writes about the solution for this problem.
    >>>
    >>>Regards,
    >>>Pushpendra
    >>>
    >>>
    >>>
    >>>
    >>>
    >>>
    >>>
    >>>
    >>>
    >>>

    >>
    >>
     
    Shan Plourde, Jul 27, 2004
    #3
    1. Advertising

Want to reply to this thread or ask your own question?

It takes just 2 minutes to sign up (and it's free!). Just click the sign up button to choose a username and then you can ask your own questions on the forum.
Similar Threads
  1. King Kong
    Replies:
    3
    Views:
    18,305
    chandusripathi
    Jul 24, 2009
  2. Replies:
    2
    Views:
    13,968
    Karl Seguin [MVP]
    Mar 7, 2006
  3. Replies:
    1
    Views:
    903
    Roedy Green
    Oct 27, 2005
  4. Just D
    Replies:
    5
    Views:
    1,093
    Just D
    Feb 1, 2007
  5. Iñaki Baz Castillo

    How to convert character to hexadecimal?

    Iñaki Baz Castillo, May 13, 2008, in forum: Ruby
    Replies:
    19
    Views:
    278
    Chris Hulan
    May 14, 2008
Loading...

Share This Page