Combining multiple XML documents using Java

I have several xmls that have the same format, and I would like to combine them into one large XML file. Is there any useful class that would allow me to capture specific nodes and merge them together, or do I need to parse all xmls and create a new one? Regards, Peter

+3
source share
3 answers

If the format is simple and the joins won't be deeply nested,
why not throw out the headline and join the text?

If combining is more complicated apache commons will come with help.
Therefore, parsing would be the most sensible solution.

+1

, XML. , . SAX , , .

+1

You can also use XSLT for this. For details, this . You can use XSLTransformer API in java.

0
source

Source: https://habr.com/ru/post/1763570/


All Articles