Your request is very broad and deals with very complicated areas of FrameMaker functionality. It can take weeks to months to understand these concepts, so it is not possible for someone to answer the questions in a forum such as this. I suggest that you get a copy of the Structure Developers Guide, then prepare for an extended period of learning and experimentation. If you have specific, focused questions, then this is the right place to ask.
You need to create a "Structured Application" to format the XML you have in the way you want.
The minimum you need is an EDD and a template that contains all the styles that you want to map to elements.
Step 1 - Create an EDD
To create an EDD, choose Structure > EDD > New EDD from the FrameMaker main menu. In an EDD you define the elements and their attributes and how they should be formatted. If you have a DTD or Schema, you can import this one into the EDD and FrameMaker will automatically create all elements for you. Adjust the definitions as necessary.
Example: If you only have the elements <root> and <p> in your XML, an EDD like the following would be already enough. In the following example, the element <p> is mapped to the paragraph style "BodyText".
Step 2 - Create the template
Create a new FrameMaker document from the scratch (File > New > Document).
Design the page layout as you like.
Import the EDD into this template (File > Import > Element Definitions).
It automatically creates the styles you need. Use the paragraph designer (ctrl+m) to change the formatting definitions of each style as you like.
Step 3 - Create the Structured Application
You can use the "Structured Application Designer" (Choose Structure > Structured Application Designer from the main menu) to create a Structured Application:
There you can link the DTD (if you have one), the RW rules (if you need one), the EDD, and, most importantly, the template (makes sense, right?). Also, you can set the DOCTYPE (root element of your XML) there, so that FrameMaker can automatically detect your XML and use this application. Give it a meaningful "Application Name".
You do not necessarily need a DTD (but it's good to have one for validation) or RW rules unless you have specific requirements e.g. for mapping table elements to the FrameMaker table model.
Of course, as the EDD is extremely powerful and you can create all kinds of context-based formatting rules, it can get complex. My suggestion is to start step by step and then go deeper.
Let us know how you proceed. We'll also be happy to help you if you have specific questions.