This module provides various type-testing functions, relating to data types used in the XML::Easy ensemble. These are mainly intended to be used to enforce validity of data being processed by XML-related functions.

There are two flavours of function in this module. Functions of the first flavour only provide type classification, to allow code to discriminate between argument types. Functions of the second flavour package up the most common type of type discrimination: checking that an argument is of an expected type. The functions come in matched pairs.

Each of these functions takes one scalar argument (ARG) to be tested. Any scalar value is acceptable for the argument to be tested. Each is_ function returns a simple truth value result, which is true iff ARG is of the type being checked for. Each check_ function will return normally if the argument is of the type being checked for, or will die if it is not.

Check whether ARG is a plain string consisting of a sequence of characters that are acceptable to XML. Such a string is valid as data in an XML element (where it may be intermingled with subelements) or as the value of an element attribute.

Check whether ARG is a reference to a hash that is well-formed as an XML element attribute set. To be well-formed, each key in the hash must be an XML name string, and each value must be an XML character data string.