| Author |
XML Processing, Converting and Rewriting XML
|
aanand kannan
Greenhorn
Joined: Feb 21, 2007
Posts: 1
|
|
Hi The source XML to be converted to the following Target XML format. Requirement examples: <Ship_Name> Anand </Ship_Name> To be converted to: <variable name="Ship_Name"> Anand </variable> and <Start_Date> 20080216 </Start_Date> To be converted to: <variable name="Start_Date"> 20080216 </variable> The above tags are two exmaples in the XML doc. Consider, the tag names will be generic. There may be some 150 different tags. Really huge. I would like to have a generic java program that reads these tags and write to a target xml. I could find only hard coded programs. It would be great if I could get a program that could handle a really huge XML. That shall give me a jump start. Thanks in Advance. Anand sanandkannan@yahoo.com [ February 19, 2008: Message edited by: aanand kannan ] [ February 19, 2008: Message edited by: aanand kannan ]
|
 |
Ilja Preuss
author
Sheriff
Joined: Jul 11, 2001
Posts: 14112
|
|
|
Why do you need it to be a Java program? This should be really simple using XSL-T...
|
The soul is dyed the color of its thoughts. Think only on those things that are in line with your principles and can bear the light of day. The content of your character is your choice. Day by day, what you do is who you become. Your integrity is your destiny - it is the light that guides your way. - Heraclitus
|
 |
William Brogden
Author and all-around good cowpoke
Rancher
Joined: Mar 22, 2000
Posts: 12324
|
|
If you are really talking about XML files so large that they are too big for XSLT, you might find one of the "pipeline" processing toolkits such as ServingXML to be useful. For an introduction to "pipeline processing" of XML, here is my article on the subject. Bill
|
Java Resources at www.wbrogden.com
|
 |
 |
|
|
subject: XML Processing, Converting and Rewriting XML
|
|
|