A semantics-based framework for KD- and IR-style resource querying on XML-based P2P Information Systems is described in this paper. Particularly, we present and discuss in detail the XML data model and the knowledge representation model of such a framework, which are both based on the amenity of adding semantics to data. As main result, we obtain a collection of techniques that allows us to efficiently process XML-formatted knowledge in P2P IS.