gsfd gsfd - 16 days ago 7
Android Question

How to put the character & into an xml in android correctly

I have a string that says "the following characters are invalid: "! @ # $ % ^ \& * ( ) / \ or space" and i don't know how to put the & symbol into an xml file without causing an error? I know you are suppose to do something along the lines of \& but I'm not sure exactly what it is?

Answer

If \& doesn't work, try the XML entity &.

Comments