We address a problem of updating XML documents having their XML schema described by a Document Type Definition (DTD) without breaking their validity. We present a way how to express constructs available in DTD in a functional data model and propose algorithms for performing insert, update and delete operations. After that we embed the update capability into an existing query language for XML. This paper thus outlines the whole ”life cycle” of the approach from the problem analysis to its implementation. 1 Motivation and Problem Statement During our work on a functional framework for querying XML – XML-λ – we identified a need for extending the language with support of data modification operations. Our aim is to develop an approach similar to the SQL language for relational databases, i.e. have an ability both to query and update underlying data. With respect to our aim we set up basic requirements for our approach. First, we always consider typed data (this is a natural req...