Solved

XML Text

Posted on 2011-03-04
2
285 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 83

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

Best Practices: Disaster Recovery Testing

Besides backup, any IT division should have a disaster recovery plan. You will find a few tips below relating to the development of such a plan and to what issues one should pay special attention in the course of backup planning.

Question has a verified solution.

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

In this article I will describe the Backup & Restore method as one possible migration process and I will add the extra tasks needed for an upgrade when and where is applied so it will cover all.
The Delta outage: 650 cancelled flights, more than 1200 delayed flights, thousands of frustrated customers, tens of millions of dollars in damages – plus untold reputational damage to one of the world’s most trusted airlines. All due to a catastroph…
Via a live example, show how to extract insert data into a SQL Server database table using the Import/Export option and Bulk Insert.
Via a live example, show how to setup several different housekeeping processes for a SQL Server.

790 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