X-DEVICE is a deductive object-oriented database for managing XML data. X-DEVICE is an extension of the active object-oriented knowledge base system DEVICE. X-DEVICE extends DEVICE by incorporating XML data into the OODB by automatically mapping XML document DTDs to object schemata, without loosing the document’s original order of elements. XML elements are represented either as first-class objects or as attributes based on their complexity. Furthermore, X-DEVICE extends the deductive rule language of DEVICE with new operators that are used for specifying complex queries and materialized views over the stored semi-structured data. Most of the new operators have a second-order syntax (i.e. variables range over class and attribute names), but they are implemented by translating them into first-order DEVICE rules (i.e. variables can range over class instances and attribute values), so that they can be efficiently executed against the underlying deductive object-oriented database.