Skip to content
  • Categories
  • Recent
  • Tags
  • Popular
  • World
  • Users
  • Groups
Skins
  • Light
  • Cerulean
  • Cosmo
  • Flatly
  • Journal
  • Litera
  • Lumen
  • Lux
  • Materia
  • Minty
  • Morph
  • Pulse
  • Sandstone
  • Simplex
  • Sketchy
  • Spacelab
  • United
  • Yeti
  • Zephyr
  • Dark
  • Cyborg
  • Darkly
  • Quartz
  • Slate
  • Solar
  • Superhero
  • Vapor

  • Default (No Skin)
  • No Skin
Collapse
Code Project
  1. Home
  2. General Programming
  3. Delphi
  4. Bad XML document: An invalid character was found in text content. 'º'

Bad XML document: An invalid character was found in text content. 'º'

Scheduled Pinned Locked Moved Delphi
helpxmljson
5 Posts 2 Posters 5 Views 1 Watching
  • Oldest to Newest
  • Newest to Oldest
  • Most Votes
Reply
  • Reply as topic
Log in to reply
This topic has been deleted. Only users with topic management privileges can see it.
  • N Offline
    N Offline
    NJdotnetdev
    wrote on last edited by
    #1

    I am trying to loadXML(widestring) using following LOC:

    TDomDocument.DefaultInterface.loadXML(WideString(XMLText));
    

    There is a parsing error(symbol and message in subject) which is thrown while above code tries to parse string in to XMLDOMDocument. Need help. :) :)

    L 1 Reply Last reply
    0
    • N NJdotnetdev

      I am trying to loadXML(widestring) using following LOC:

      TDomDocument.DefaultInterface.loadXML(WideString(XMLText));
      

      There is a parsing error(symbol and message in subject) which is thrown while above code tries to parse string in to XMLDOMDocument. Need help. :) :)

      L Offline
      L Offline
      Lost User
      wrote on last edited by
      #2

      What is in the XMLText, and where does the error occur? If you want help here then you need to provide full details of the issue.

      N 1 Reply Last reply
      0
      • L Lost User

        What is in the XMLText, and where does the error occur? If you want help here then you need to provide full details of the issue.

        N Offline
        N Offline
        NJdotnetdev
        wrote on last edited by
        #3

        Hi Richard, My apologies, however I couldn't find a way to attach the PIC of the symbol in here. This symbol is read from SQL database as string and we are trying to save it in XML config file. That symbol looks like o+ in sql server and looks like 'º' when copied to notepad. When I am trying to loadXML with that symbol in the widestring an exception is thrown with parsing error. HTH.

        L 1 Reply Last reply
        0
        • N NJdotnetdev

          Hi Richard, My apologies, however I couldn't find a way to attach the PIC of the symbol in here. This symbol is read from SQL database as string and we are trying to save it in XML config file. That symbol looks like o+ in sql server and looks like 'º' when copied to notepad. When I am trying to loadXML with that symbol in the widestring an exception is thrown with parsing error. HTH.

          L Offline
          L Offline
          Lost User
          wrote on last edited by
          #4

          Probably because the default character encoding does not accept this character. See http://geekswithblogs.net/influent1/archive/2007/06/29/113594.aspx[^] for a suggestion which may help.

          N 1 Reply Last reply
          0
          • L Lost User

            Probably because the default character encoding does not accept this character. See http://geekswithblogs.net/influent1/archive/2007/06/29/113594.aspx[^] for a suggestion which may help.

            N Offline
            N Offline
            NJdotnetdev
            wrote on last edited by
            #5

            Thanks for the advise and suggestions.

            1 Reply Last reply
            0
            Reply
            • Reply as topic
            Log in to reply
            • Oldest to Newest
            • Newest to Oldest
            • Most Votes


            • Login

            • Don't have an account? Register

            • Login or register to search.
            • First post
              Last post
            0
            • Categories
            • Recent
            • Tags
            • Popular
            • World
            • Users
            • Groups