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,619
  • 7
  • 33
  • 67

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
  • 150,114
  • 66
  • 286
  • 303
0

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

Also, check this out : here

Paresh Mayani
  • 127,700
  • 71
  • 241
  • 295
Siddharth_Vyas
  • 9,972
  • 10
  • 39
  • 69
0

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

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

Paresh Mayani
  • 127,700
  • 71
  • 241
  • 295
Jitesh Upadhyay
  • 5,244
  • 2
  • 25
  • 43