tags:

views:

43

answers:

2

From the following trials

<tag attr="\"">
<tag attr="<![CDATA["]]>">
<tag attr='"'>

Only the last one works for a XML parser that I'm using here. Is there any other alternative?

+4  A: 

You can use &quot;

Sachin Shanbhag
+1  A: 

From the XML spec:

To allow attribute values to contain both single and double quotes, the apostrophe or single-quote character (') may be represented as "&apos;", and the double-quote character (") as "&quot;".

Wim Coenen