Check illegal characters in XML file using xml spy

I am using  SQLXML parser to insert huge xml files into my database tables.
I am able to insert small files but with big size files(500 MB) i am fiding an error which says "illegal xml character".
I serached online and someone suggested that maybe the xml file has some illegal chars that was causing trouble with the parser...my question is does anyone know how to check if an xml file has illegal chars using xmlspy software and if yes...how do i get rid of them so that i can do a bulk insert using SQLXML.

urgent help please!!
angireddyAsked:
Who is Participating?
 
DeepDanCommented:
Once i was having the same problem, it was solved after having cleaned some characters...
you need to pass your records through function before inserting them into the table, here are the characters that caused me trouble.

FUNCTION cleanstring
LPARAMETERS cString
cString = STRTRAN(cString, '&', '&')
cString = STRTRAN(cString, '<', '&lt;')
cString = STRTRAN(cString, '>', '&gt;')
cString = STRTRAN(cString, '"', '&quot;')
cString = STRTRAN(cString, "'", '&apos;')
cString = STRTRAN(cString, CHR(163), '&#163; ')
cString = STRTRAN(cString, CHR(169), '&copy;')   &&Copyright Mark Sign
cString = STRTRAN(cString, CHR(174), '&reg;')     &&Registered Mark Sign
cString = STRTRAN(cString, CHR(153), '&#8482;') &&Trade Mark Sign
cString = STRTRAN(cString, CHR(128), '&#8364;') &&Euro Sign
RETURN cString
0
Question has a verified solution.

Are you are experiencing a similar issue? Get a personalized answer when you ask a related question.

Have a better answer? Share it in a comment.

All Courses

From novice to tech pro — start learning today.