Yes, this is very do-able. There are 2 steps to this process. The first is to parse the xml. Some sample Java code for parsing xml would be (this example shows getting a "person" node from the xml file, but it can easily be adapted to your xml file):
DocumentBuilderFactory factory = DocumentBuilderFactory.newInstance();
DocumentBuilder parser = factory.newDocumentBuilder();
Document document = parser.parse("xml/sample.xml");
NodeList personNodes = document.getElementsByTagName("person");
List<String> names = new LinkedList<String>();
for (int i = 0; i < personNodes.getLength(); i++) {
String firstName = null;
String lastName = null;
Node personNode = personNodes.item(i);
NodeList children = personNode.getChildNodes();
for (int j = 0; j < children.getLength(); j++) {
Node child = children.item(j);
String nodeName = child.getNodeName();
String nodeValue = child.getTextContent();
if ("firstName".equals(nodeName)) {
firstName = nodeValue;
} else if ("lastName".equals(nodeName)) {
lastName = nodeValue;
}
}
names.add(firstName + " " + lastName);
}
Once you have extracted the data you need, created a new JTable that uses this data. The simplest JTable constructor to use for your purposes would be:
JTable(Object[][] rowData, Object[] columnNames)
There are more advanced and better ways to do this (such as with data binding frameworks), but this is definitely a good starting point.