Solved

XML negating a quote

Posted on 2004-04-05
2
447 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
2 Comments
 
LVL 43

Accepted Solution

by:
TimCottee earned 50 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

PRTG Network Monitor: Intuitive Network Monitoring

Network Monitoring is essential to ensure that computer systems and network devices are running. Use PRTG to monitor LANs, servers, websites, applications and devices, bandwidth, virtual environments, remote systems, IoT, and many more. PRTG is easy to set up & use.

Question has a verified solution.

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

Suggested Solutions

Browsers only know CSS so your awesome SASS code needs to be translated into normal CSS. Here I'll try to explain what you should aim for in order to take full advantage of SASS.
JSON is being used more and more, besides XML, and you surely wanted to parse the data out into SQL instead of doing it in some Javascript. The below function in SQL Server can do the job for you, returning a quick table with the parsed data.
Viewers will learn how to use the SELECT statement in SQL to return specific rows and columns, with various degrees of sorting and limits in place.
Learn how to create flexible layouts using relative units in CSS.  New relative units added in CSS3 include vw(viewports width), vh(viewports height), vmin(minimum of viewports height and width), and vmax (maximum of viewports height and width).

813 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

17 Experts available now in Live!

Get 1:1 Help Now