开发者

Java: Mapping XML to other XML (translation)

开发者 https://www.devze.com 2023-03-02 12:53 出处:网络
To put this simply, I would like to make a java program that takes one xml file (in format x) as input, translate it to XML format y, maybe do some other stuff to it, and then output it.

To put this simply, I would like to make a java program that takes one xml file (in format x) as input, translate it to XML format y, maybe do some other stuff to it, and then output it.

Format x and y are fairly similar (both used in NLP tools, have same kind of tokens etc.) and I also have the description schemas for both of them. In case you're curious, I'd like to translate something to TCF format; make a bridge between 2 tools.

I've never done this before, how does one go about mapping one xml to another? Can you recommend some libraries or tools? (this has to be usable in eclipse though, and should be free)

So far I found this program from stylus studio, but it's not free and even though it looks pretty cool, I'm not sure if it's output would be o开发者_开发技巧f any use for my java program.

If the result of this conversion is an XSLT, can I use it in java? (how does this xslt work for translating?) (so that I'd maybe use their GUI to map everything once, and then keep using the resulting xslt somehow in my program)

Many thanks for any shedding of light on the matter!


Use XML Transformations, which is implemented by a set of classes built into the jdk, see

http://www.brics.dk/~amoeller/XML/transformation/index.html

for a tutorial.

0

精彩评论

暂无评论...
验证码 换一张
取 消