This week's book giveaway is in the OCAJP 8 forum. We're giving away four copies of OCA Java SE 8 Programmer I Study Guide and have Edward Finegan & Robert Liguori on-line! See this thread for details.
First you will have to determine the element mapping. ie., the set of distinct postscript node types and the corresponding set of XML tags that you are goint to define. Lets call these sets as InputSet and XMLSet. Once you have the mapping in place, you will then write a Java program to parse the postscript input file. Every time you find an element in the InputSet, simply pick the corresponding XML tag from the XMLSet, create a node with the tagnem using DOM and copy the contents of the input file as the content of the node. Repeat the process until you have consumed the entire input file. Since you will be constructing a DOM tree from scratch as you parse the input file, you will have to learn how to use the DOM API. Hope that helps!
Open Group Certified Distinguished IT Architect. Open Group Certified Master IT Architect. Sun Certified Architect (SCEA).