Want to win a PS4? Go Premium and enter to win our High-Tech Treats giveaway. Enter to Win

x
?
Solved

XML negating a quote

Posted on 2004-04-05
2
Medium Priority
?
467 Views
Last Modified: 2013-11-19
I Am trying to insert into a tables using XML, But i get a error because the value of one of the xml elements has a single  quote ( < tablename   notes = " 2000.00 rec'd from......" /> ) how do i negate the single quote.
0
Comment
Question by:afentonjm
[X]
Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people just like you are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
2 Comments
 
LVL 43

Accepted Solution

by:
TimCottee earned 200 total points
ID: 10757561
Hi afentonjm,

Double it, SQL will interpret two successive ' ('') as a single quote and store the single quote but will not generate an error.

Tim Cottee
Brainbench MVP for Visual Basic
http://www.brainbench.com
0
 
LVL 14

Expert Comment

by:Thandava Vallepalli
ID: 10757718
Hello,

Use    XML Entity  reference in place of single quote.   i.e  "&#39;".  

Now your new syntax looks like ......

( < tablename   notes = " 2000.00 rec&#39;d from......" /> )



All the best,
V.Thadnava Krishna.
0

Featured Post

Independent Software Vendors: We Want Your Opinion

We value your feedback.

Take our survey and automatically be enter to win anyone of the following:
Yeti Cooler, Amazon eGift Card, and Movie eGift Card!

Question has a verified solution.

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

Why is this different from all of the other step by step guides?  Because I make a living as a DBA and not as a writer and I lived through this experience. Defining the name: When I talk to people they say different names on this subject stuff l…
Recently we ran in to an issue while running some SQL jobs where we were trying to process the cubes.  We got an error saying failure stating 'NT SERVICE\SQLSERVERAGENT does not have access to Analysis Services. So this is a way to automate that wit…
Viewers will learn how to use the SELECT statement in SQL and will be exposed to the many uses the SELECT statement has.
The viewer will learn the basics of jQuery, including how to invoke it on a web page. Reference your jQuery libraries: (CODE) Include your new external js/jQuery file: (CODE) Write your first lines of code to setup your site for jQuery.: (CODE)

609 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