Want to protect your cyber security and still get fast solutions? Ask a secure question today.Go Premium


Check illegal characters in XML file using xml spy

Posted on 2006-05-11
Medium Priority
Last Modified: 2008-02-01
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!!
Question by:angireddy
1 Comment

Accepted Solution

DeepDan earned 2000 total points
ID: 16667470
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
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

Featured Post

Concerto Cloud for Software Providers & ISVs

Can Concerto Cloud Services help you focus on evolving your application offerings, while delivering the best cloud experience to your customers? From DevOps to revenue models and customer support, the answer is yes!

Learn how Concerto can help you.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

In this blog post, we’ll look at how ClickHouse performs in a general analytical workload using the star schema benchmark test.
MSSQL DB-maintenance also needs implementation of multiple activities. However, unprecedented errors can hamper the database management. In that case, deploying Stellar SQL Database Toolkit ensures fast and accurate database and backup repair as wel…
Video by: Steve
Using examples as well as descriptions, step through each of the common simple join types, explaining differences in syntax, differences in expected outputs and showing how the queries run along with the actual outputs based upon a simple set of dem…
This lesson discusses how to use a Mainform + Subforms in Microsoft Access to find and enter data for payments on orders. The sample data comes from a custom shop that builds and sells movable storage structures that are delivered to your property. …
Suggested Courses

580 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question