Solved

XML Text

Posted on 2011-03-04
2
286 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
[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 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

Ransomware-A Revenue Bonanza for Service Providers

Ransomware – malware that gets on your customers’ computers, encrypts their data, and extorts a hefty ransom for the decryption keys – is a surging new threat.  The purpose of this eBook is to educate the reader about ransomware attacks.

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…
For both online and offline retail, the cross-channel business is the most recent pattern in the B2C trade space.
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 set up a backup for SQL Server using a Maintenance Plan and how to schedule the job into SQL Server Agent.

735 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