def is_valid_xml_char_ordinal(i):
    """
    Defines whether char is valid to use in xml document

    XML standard defines a valid char as::

    Char ::= #x9 | #xA | #xD | [#x20-#xD7FF] | [#xE000-#xFFFD] | [#x10000-#x10FFFF]
    """
    return 32 <= i <= 55295 or i in (9, 10, 13
        ) or 57344 <= i <= 65533 or 65536 <= i <= 1114111
