This week's giveaway is in the EJB and other Java EE Technologies forum. We're giving away four copies of EJB 3 in Action and have Debu Panda, Reza Rahman, Ryan Cuprak, and Michael Remijan on-line! See this thread for details.
Can someone indicate how to exactly import one xml file in another xml file?
Thanks in advance,
Hi, I was trying to do the same thing once, first I inserted placeholder in the first xml and then replaced the placeholder with another xml.
But I didn't like it. So after some searching I've done this (it takes to xml strings - envelope and body, and inserts body inside the envelope's <Body></Body> tags):
The code should be self explanatory, but if anything is unclear, or somebody knows how to do it another way (better, easier) let us know.
Joined: May 24, 2008
So, without using the includes tag, there is no way to do the import of the xml files in other xml files, right? XML doesn't support that kind of feature automatically (or by just using entity references) ?
Joined: Dec 30, 2009
what do you mean without using the import tags? In my example you have to xml documents the and only thing you need to know is where you want to insert the second xml file. You can easily change it and insert the second file inside the root tag of the first one etc.