Previous Topic: Using Variables in Batch ProcessingNext Topic: SQL Server Types


Using Special XML Characters in Batch Files

Many characters require special treatment if included as part of a string in XML files. The following table lists the characters that require special treatment in a batch file:

Character

Character Name

Character as Used in XML Files

&

ampersand

&

<

Less than

&lt;

>

Greater than

&gt;

"

Quotation mark

&quot;

'

Apostrophe

&#39;

Example:

The following is an invalid use of the ampersand (&) character in an XML string:

<Organization>Discovery & Auditing</Organization>

The following is a valid use of the ampersand (&) character in an XML string:

<Organization>Discovery &amp; Auditing</Organization>