2

How to put a “<” in string.xml file i ve been searching for a solution for this problem but i cant any and im getting an error when i just put a simple < in the string file any ideas i saw this question but its not the same with mu problem How to put a "-" in string.xml file

here is my code

<string name="sp"> SP </string>
<string name="p1"> P1 </string>
<string name="p2"> P2 </string>
<string name="p3"> P3 </string>
<string name="p4"> P4 </string>
<string name="dialogprevious"> < </string> -- error here
<string name="dialognext"> > </string>
Community
  • 1
  • 1
Giant
  • 1,589
  • 5
  • 32
  • 64

3 Answers3

9

Write < as entity-escaped &lt; (mnemonic: lt as in less than).

Similarly > as &gt; (greater than).

Further reading: http://en.wikipedia.org/wiki/List_of_XML_and_HTML_character_entity_references

laalto
  • 144,748
  • 64
  • 275
  • 293
0

Use &lt; for < and &gt; for >

Also, check this out : here

Paresh Mayani
  • 125,853
  • 70
  • 238
  • 294
Siddharth_Vyas
  • 9,837
  • 10
  • 38
  • 67
0

1) for less than(<), use &lt;

2) for greateh than(>), use &gt;

Paresh Mayani
  • 125,853
  • 70
  • 238
  • 294
Jitesh Upadhyay
  • 6,557
  • 1
  • 27
  • 44