Copy/Paste External XML files based on a list of names



I'm wanting to basically import entire files of XML into a single XML file on runtime of a Java program/game. The game is made so it looks for a specific file in a specific location, and only allow one such file. I'm trying to make it load up "multiple" files by including them all in one, but without me actually knowing what those files are, just where they would be and their name.

I've tried using the external entity system, where I'd import the file into a variable and call it using the &file; file, but that can only be using in the prolog which I can't use and logic on.


My main goal is to have it so other people, who'd make the other XML files, would only have to add a string into a list in my XML file. My file would then take that name and would know where their files are (all directories are the same aside from that name) and would add all of the information inside into the XML file, which the game would read as a single file.


How would I actually do something like this? I've looked into XSLT but I cannot seem to get that to work in this manner (I've tried the <xsl:copy-of> but I couldn't get it to work).


Again, how could I make an XML file import other XMLs based off a single internal list and add all of their content (tags, information, direct copy-paste)into a single XML?


No comments:

Post a Comment