Solved

Special Characters in XML to avoid?

Posted on 2008-06-16
4
1,314 Views
Last Modified: 2010-05-18
Are there any characters that should be avoided (besides the  < > & " '). I am trying to process data that has sections that start with a backslash "\" and contain multiple dollar signs "$". This data is failing the import. $MM56A:$F603 is some of the data.

Thanks!
0
Comment
Question by:p1800volvo
  • 2
4 Comments
 
LVL 60

Expert Comment

by:Geert Bormans
ID: 21801568
in PCDATA only <> and & should be escaped.
All the other data needs to be conforming the encoding
so having a single byte encode 'é' in a UTF-8 is not allowed

some binary characters are not allowed as welll: NUL, BELL, ....
if you are pushing binary data in your XML, you would better check the XML specification
http://www.xml.com/axml/testaxml.htm
for allowed characters
0
 
LVL 1

Author Comment

by:p1800volvo
ID: 21802928
The data is wrapped in CDATA. The $MM56A:$F603 section is actual text, not binary. Just need to ensure that it is not being misinterprited as another character set. We are importing under XML 1.0 but the database is not UNICODE, single byte characters only.

Thanks!
0
 
LVL 60

Accepted Solution

by:
Geert Bormans earned 50 total points
ID: 21815724
well, then there should not be a problem.
Make sure that you make the XML encoding equal to the database encoding

cheers

Geert
0

Featured Post

Is Your Active Directory as Secure as You Think?

More than 75% of all records are compromised because of the loss or theft of a privileged credential. Experts have been exploring Active Directory infrastructure to identify key threats and establish best practices for keeping data safe. Attend this month’s webinar to learn more.

Question has a verified solution.

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

Suggested Solutions

Introduction In my previous article (http://www.experts-exchange.com/Microsoft/Development/MS-SQL-Server/SSIS/A_9150-Loading-XML-Using-SSIS.html) I showed you how the XML Source component can be used to load XML files into a SQL Server database, us…
Browsing the questions asked to the Experts of this forum, you will be amazed to see how many times people are headaching about monster regular expressions (regex) to select that specific part of some HTML or XML file they want to extract. The examp…
In this video I am going to show you how to back up and restore Office 365 mailboxes using CodeTwo Backup for Office 365. Learn more about the tool used in this video here: http://www.codetwo.com/backup-for-office-365/ (http://www.codetwo.com/ba…
Internet Business Fax to Email Made Easy - With eFax Corporate (http://www.enterprise.efax.com), you'll receive a dedicated online fax number, which is used the same way as a typical analog fax number. You'll receive secure faxes in your email, fr…

911 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

Need Help in Real-Time?

Connect with top rated Experts

22 Experts available now in Live!

Get 1:1 Help Now