Relational model and XML model have their own advantages and disadvantages in data maintenance and sharing. In this paper, we consider a framework that can be used in many applications that need to maintain their potentially large data in relational database and partially publish, exchange and/or utilize the data in different XML formats according to the applications’ preferences. The existing relational-to-XML data transformation relies on pre-defined XML view or transformation rules. Thus the output XML data or views are rigid and invariable, and cannot fulfill the requirement of format flexibility in our considered situations. In this paper, we propose a semantic approach that supports the framework under our consideration. We use conceptual models to design both relational data and XML views, and invent algorithms to transform data in one model to the other via conceptual model transformation. We also demonstrate how XPath queries issued to XML views can be translated and processed against a relational database through conceptual models.