Functional dependency is an important semantic representation both in relational databases and XML documents. Analyzed in this paper are the differences of func tional dependencies when they are applied in XML documents and relational databa ses. A concept of functional dependency for XML based on DTD path expressions is proposed. The advantage of this definition is that it can represent the functio nal dependencies not only between the values of attributes and elements, but als o between the nodes of elements. And finally, a group of complete inference rule s about XML functional dependency is given, which is significant to the implicat ion problem of XML functional dependency.