<string name="app_name">something & something</string>
gives an error. How can i escape this?
Is this correct
<string name="app_name">something & something</string>
or is there a better way?
Character combinations consisting of a backslash (\) followed by a letter or by a combination of digits are called "escape sequences." To represent a newline character, single quotation mark, or certain other characters in a character constant, you must use escape sequences.
In ANSI SQL, the backslash character (\) is the escape character. To search for data that begins with the string \abc , the WHERE clause must use an escape character as follows: ... where col1 = '\\abc';
Try reading this page: http://www.xmlnews.org/docs/xml-basics.html it looks like it contains the answer you are looking for.
In summary, here is the list of escaped characters and the escape code
Character Predeclared Entity & & < < > > " " ' '
Referenced from the link.
For me " ; didin't work so I used \"" and this character was escaped.
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