Crusaderpyro
Crusaderpyro

Reputation: 2242

What is the equivalent of 'greater-than-equal-to' or 'less-than-equal-to' in XML?

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;

Upvotes: 21

Views: 43728

Answers (3)

Crusaderpyro
Crusaderpyro

Reputation: 2242

From a comment by choroba:

Just use >= and <=.
- Oct 19, 2016 at 9:46

Upvotes: 26

Tigt
Tigt

Reputation: 1497

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

Upvotes: 7

Cyb3rKo
Cyb3rKo

Reputation: 464

For using it in programming languages I chose using Unicode:

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

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

Upvotes: 1

Related Questions