You can use standard Java libraries to dynamically parse/construct XML.
You can easily create a new XML dynamically using DOM or JDOM.
You can use SAX, DOM, JDOM or StAX to process XML.
You can use Lists and Maps to dynamically construct a Java representation of a parsed XML to be used in your code.
Of course, these statements are pretty general, but your requirements are not too specific as well. Please give more specific requirements for a more specific advice.
Java Development on Demand.