When I tried to use &, <,> as text of a text view, both in main.xml and in the strings.xml file, it returns an error. I want to show "&", "<" anyway, in a text view. How to do it?
Please advise me.
Thanks in advance.
As pointed out by @Welbog, there are 5 XML escape sequences:
" " ' ' < < > > & &
Source: Symbols for deleting XML documents
I do not know Android, but in using XML
< = < > = > & = & " = " ' = '
Or use CDATAfor example
CDATA
<![CDATA[ my String with special chars like >, < and & normally not allowed in XML! ]]>
1 escape XML. @mikaveli
This is XML. You have to run away from them. Maybe you should learn XML before using XML-based layout language?
< < > > & & " " (in attributes) ' ' (in attributes)
Source: https://habr.com/ru/post/1790275/More articles:Array ordering for maximum pair matches - pythonЕсть ли аналоговый алгоритм std:: for_each в С# (Linq to Objects) - c#как получить контролируемое случайное число в С# - c#https://translate.googleusercontent.com/translate_c?depth=1&pto=aue&rurl=translate.google.com&sl=ru&sp=nmt4&tl=en&u=https://fooobar.com/questions/1790273/simple-threading-question-locking-access-to-shared-resource-or-entire-function&usg=ALkJrhhbTIUyA-ThisILMzv5xNXpD2jRxAPython Network / cidr calculations - pythonShare facebook wall on website - facebookPHP-массив, назначенный и - phpread-only join - hibernatemysql.sock missing after new intall - mysqlRanking elements in data.frame - rAll Articles