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 ?
You will have to escape those symbols as following:
<
will be <
>
will be >
The ≤
sign doesn't need escaping.
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