The common feature of the XML query languages is the use of path expressions to query XML data. To speed up the processing
of path expression queries, it is important to be able to quickly determine ancestor-descendant relationship between any pair
of nodes in the hierarchy of XML data. At the same time, keyword search is also important to query XML data with a regular
structure, if the user does not know the structure or only knows the structure partially. In this paper, we propose a new
approach about storing and querying XML data in the RDBMS basing on the idea of the numbering schema and the inverted list.
Our approach allows us to quickly determine ancestor-descendant relationship between any pair of nodes in the hierarchy of
XML data, which is particularly, highly effective for the searching paths that are very long or unknown. Examples have demonstrated
that our approach can effectively supports both query powers in XQuery and keyword searches. Our approach is flexible enough
to support XML documents both with schema and without schema, and applications both retrieval and update.