How to escape the < and ≤ symbols in xml?

Viewed 13710

I want to create a string <res> in android as below:

<string name="bmi0">0: BMI≤18.5</string>
<string name="bmi1">1: 18.5<BMI≤24</string>
<string name="bmi2">2: 24<BMI≤27</string>

But i shown the error of "Tag start is not closed".

I tried to put a \ symbol in front, but it doesn't work, it has shown the same error.

<string name="bmi0">0: BMI\≤18.5</string>
<string name="bmi1">1: 18.5<BMI\≤24</string>
<string name="bmi2">2: 24<BMI\≤27</string>

How to escape the special XML symbols ?

8 Answers
Related