This week's book giveaway is in the OCAJP 8 forum. We're giving away four copies of OCA Java SE 8 Programmer I Study Guide and have Edward Finegan & Robert Liguori 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.