Is there an escape character for a double quote in xml? I want to write a tag like:
<parameter name="Quote = " ">
but if I put ", then that means string has ended. I need something like this (c++):
printf("Quote = \" ");
Is there a character to write before the double quote to escape it?
XML escape characters There are only five: " " ' ' < < > > & & Escaping characters depends on where the special character is used. The examples can be validated at the W3C Markup Validation Service.
xml Escaping Apostrophes and quotesAttribute values can appear in simple or double quotes. The appropriate character must be escaped.
From the XML specification: To allow attribute values to contain both single and double quotes, the apostrophe or single-quote character (') may be represented as "'", and the double-quote character (") as """.
Try this:
"
Here are the common characters which need to be escaped in XML, starting with double quotes:
"
) are escaped to "
&
) is escaped to &
'
) are escaped to '
<
) is escaped to <
>
) is escaped to >
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With