Bad XML document: An invalid character was found in text content. 'º'
-
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. :) :)
-
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. :) :)
-
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.
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.
-
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.
-
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.
Thanks for the advise and suggestions.