This week's book giveaway is in the Jobs Discussion forum.
We're giving away four copies of Java Interview Guide and have Anthony DePalma on-line!
See this thread for details.
The moose likes XML and Related Technologies and the fly likes Looking for ideas on best way to do this with XML.... Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login

Win a copy of Java Interview Guide this week in the Jobs Discussion forum!
JavaRanch » Java Forums » Engineering » XML and Related Technologies
Bookmark "Looking for ideas on best way to do this with XML...." Watch "Looking for ideas on best way to do this with XML...." New topic

Looking for ideas on best way to do this with XML....

Mike Kopack

Joined: Jul 13, 2005
Posts: 6
Hey gang,

Part of my project is responsible for reading in an XML document containing some high-level information used in aircraft mission planning. It needs to take that high-level info and produce a more detailed mission plan XML document. For instance, the input document might contain information like "Takeoff point", "loiter area", "landing point" as elements containing user input parameters in the document. The output would contain similar information, but broken down and mapped to more specific detailed information such as flight waypoints and such.

I know how to process Java documents using both DOM and SAX (the built in packages in Java 1.4+). Currently I don't have any schemas for these documents, but I can make those if needed.

I'm just wondering if anyone has some ideas on a straightforward way to do such translations. I'm not expecting to do seriously complicated conversions. Every node in the source plan document has a "type" attribute in it, and in pretty much all cases the source node will map to 1-n more detailed destination nodes with a very small set of type mappings between them.

Any ideas how I could quickly do this? I started looking at JAXB but think it might be overkill. XSLT sounds like it could be helpful, but I know nothing about it.


Gernot Greimler

Joined: Sep 08, 2005
Posts: 6
if you just want to map data from one XML to another XML, XSLT is the key.
I work with Altova MapForce to "map" the Data from one XML Scheme to the other and don't have to write a single line of code.
Roseanne Zhang
Ranch Hand

Joined: Nov 14, 2000
Posts: 1953
XSLT is definitely the way to go!!!

Best tutorials
I agree. Here's the link:
subject: Looking for ideas on best way to do this with XML....
It's not a secret anymore!