Page 1 of 1

#include and xml in another xml

Posted: Sun Jul 18, 2010 19:10
by quasius
I'm using xml to define my CEGUI gui, but a single file is gettin a bit unwieldy. Is there a simple way to "#include" an xml file in another xml file? Thanks for any info.

Re: #include and xml in another xml

Posted: Mon Jul 19, 2010 10:37
by emarcotte
I don't know that CEGUI supports it or enables it in the various xml parsing libraries it can use, but in general the technology you're looking for is xinclude. You could try sticking an xinclude in your document and seeing if CEGUI recognizes the additional content. If not, you could see if the parser you choose supports xinclude and see if you can turn it on in CEGUI (I think xerces and expat both support it, but I may be wrong).

Re: #include and xml in another xml

Posted: Wed Jul 21, 2010 09:27
by CrazyEddie
I also don't know if this would work, I guess it depends on how it's implemented exactly in the parsers. My first thought is that it probably won't work, but yeah, try it and let us know :)

CE.

Re: #include and xml in another xml

Posted: Thu Jul 22, 2010 06:44
by quasius
I couldn't get it to work and eventually did it myself. (Wrote code to process the include directives.) It just seemed to be ignoring the include directives.