From the following studies
<tag attr="\""> <tag attr="<![CDATA["]]>"> <tag attr='"'>
Only the latter works for the XML parser that I use here. Is there any other alternative?
You can use "
"
From XML Specification :
To resolve attribute values ββin both single and double quotation marks, an apostrophe or single quote character (') can be represented as "&", and a double quote character (") as" "".
The String conversion page on the Coder Toolbox site is convenient for encoding more than a small amount of HTML or XML code to include as a value in an XML element.
The double quote character ( " ) may be escaped as " but here the rest of the story ...
"
In XML attributes, separated by double quotes:
<EscapeNeeded name="Pete "Maverick" Mitchell"/>
In XML text content:
<NoEscapeNeeded>He said, "Don't quote me."</NoEscapeNeeded>
In XML attributes, separated by single quotes ( ' ):
'
<NoEscapeNeeded name='Pete "Maverick" Mitchell'/>
Similarly, ( ' ) does not require escaping if ( " ) are used for separators of attribute values:
<NoEscapeNeeded name="Pete 'Maverick' Mitchell"/>