I'd assume that the actual data is kept in a column in a table (one that's only 1000 characters long) and only output in the XML format.
Reminds me of a health insurance form I filled out where it asked you for your gender, but never your sex.
For the curious: http://www.who.int/gender/whatisgender/en/index.html
Essentially, sex is biological while gender is social. Transsexuality is a disparity between what someone was born biologically as (sex) and what they identify as (gender).
A lot of medical data processing is spread through a huge series of SQL and mainframe databases with lots of hacks to keep them roughly compatible.
A friend worked medical database where "sex" was a seven field containing values from {"F", "M", "Male", "woman"...} etc.
This is horrific but it's possible to imagine that it arose as a compromised between various equally terrible options...