Solved

XML Text

Posted on 2011-03-04
2
282 Views
Last Modified: 2012-05-11
In my select statement building my XML file there are records that have

R & B Builders

My select is placing that in my xml as
R & B Builders

How do I get it in there correctly?
blah...blah...blah...
	  debtFirstName 'Debtors/Names/IndividualName/FirstName',
	  debtLastName 'Debtors/Names/IndividualName/LastName'
from
	  research.dbo.r_data_ucc where debtLastName Like 'B%'
for xml path('Record')

Open in new window

0
Comment
Question by:lrbrister
2 Comments
 
LVL 82

Accepted Solution

by:
Dave Baldwin earned 500 total points
ID: 35038491
" <, >, & and (in attribute values) " need escaping " in XML because they are used in markup.  &amp; is correct and the code that processes the XML should convert it back if necessary.  That is also the correct encoding to display an ampersand on a web page.
0
 

Author Closing Comment

by:lrbrister
ID: 35038582
Thanks
0

Featured Post

How to improve team productivity

Quip adds documents, spreadsheets, and tasklists to your Slack experience
- Elevate ideas to Quip docs
- Share Quip docs in Slack
- Get notified of changes to your docs
- Available on iOS/Android/Desktop/Web
- Online/Offline

Join & Write a Comment

Suggested Solutions

Use this article to create a batch file to backup a Microsoft SQL Server database to a Windows folder.  The folder can be on the local hard drive or on a network share.  This batch file will query the SQL server to get the current date & time and wi…
International Data Corporation (IDC) prognosticates that before the current the year gets over disbursing on IT framework products to be sent in cloud environs will be $37.1B.
This video shows, step by step, how to configure Oracle Heterogeneous Services via the Generic Gateway Agent in order to make a connection from an Oracle session and access a remote SQL Server database table.
Via a live example, show how to extract insert data into a SQL Server database table using the Import/Export option and Bulk Insert.

746 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

13 Experts available now in Live!

Get 1:1 Help Now