In this paper we introduce RML, which stands for Rule Markup Language and is used for rule–based transformations of XML. With RML the user can define XML wildcard elements, variables containing parts of the XML such as variables for element names or variables for lists of elements. Any XML vocabulary can be combined with RML to define transformations that can be performed by RML tools also discussed in this paper. As an application of RML we show how it can be used to specify semantics for UML models. The static structure is defined in XML and the dynamic behavior of the model is captured with RML. The RML tools then provide an XML-based execution platform for UML models. This approach therefore can be used to simulate and analyze UML models.