22

I found this Use of Greater Than Symbol in XML where the answer is to use the following for 'greater-than' and 'less-than' respectively:

> and <

However, what should we use for 'greater-than-equal-to' and 'less-than-equal-to' ?

I already tried the following but it didn't work for me.

≥ and ≤ and &gte; and &lte;
Bergi
  • 630,263
  • 148
  • 957
  • 1,375
Crusaderpyro
  • 2,163
  • 5
  • 29
  • 53

4 Answers4

23

Thanks to comment from choroba.

>= and <=

Crusaderpyro
  • 2,163
  • 5
  • 29
  • 53
6

As XML is Unicode-aware, it prefers the raw characters ≤ and ≥. Alternatively, ≤ and ≥ are the hexadecimal character references to ≤ and ≥.

Tigt
  • 1,330
  • 2
  • 19
  • 40
2

For using it in programming languages I chose using Unicode:

Java
"\u2264" for ≤
"\u2265" for ≥

Python
u"\u2264" for ≤
u"\u2265" for ≥

Cyb3rKo
  • 413
  • 7
  • 22
-10

You can use <= for less than equall to and >= for greater than equall to