Reputation: 11765
i have made a string named info_data as follows
<string name="info_address">SVG Service Verlags GmbH & Co. KG\n
Schwertfegerstra?e 1-3\n
D-23556 L?beck\n
</string>
i am getting an xml error saying that
Multiple annotations found at this line: - The entity name must immediately follow the '&' in the entity reference. - error: Error parsing XML: not well-formed (invalid token)
this error comes on the first line containing the &.
what is going wrong and how do i fix it.
thank you in advance.
Upvotes: 13
Views: 5620
Reputation: 528
While other answers about the ampersand may be correct, I don't think its just that.
Where an attribute value is a string, double backslashes ('\') must be used to escape characters — for example, '\n' for a newline or '\uxxxx' for a Unicode character.
You have \n, which may need to be \\n in addition to the change to the &
Upvotes: 3
Reputation: 33983
<string
name="info_address">SVG Service Verlags GmbH & Co. KG\n Schwertfegerstra?e 1-3\n
D-23556 L?beck\n</string>
copy paste the code i have pasted.
use this string use &
instead of &
Upvotes: 3
Reputation: 10948
You can't use the & sign. Try &
(I haven't tested it but it may work).
Upvotes: 45