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.
Note: A string is a simple resource that is referenced using the value provided in the name attribute (not the name of the XML file). So, you can combine string resources with other simple resources in the one XML file, under one <resources> element. file location: res/values/filename.xml. The filename is arbitrary.
Android DOM(Document Object Model) parser is a program that parses an XML document and extracts the required information from it. This parser uses an object-based approach for creating and parsing the XML files. In General, a DOM parser loads the XML file into the Android memory to parse the XML document.
The most common cause is encoding errors. There are several basic approaches to solving this: escaping problematic characters ( < becomes < , & becomes & , etc.), escaping entire blocks of text with CDATA sections, or putting an encoding declaration at the start of the feed.
You can't use the & sign. Try &
(I haven't tested it but it may work).
I believe you will need to change the &
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