Dynamic generated XML's ?
#1
hey there, Rofl

i was wondering if its possible to generate my xml files dynamically?

For example that i ask in a specific tag the SQLite Database (or MYSQL or whatever...)

Instead of this:
<videoextensions>
<add>.ex1|.ex2</add>
<remove>.ex3|.ex4</remove>
</videoextensions>

Something like that(just an example):
<videoextensions>
<add>sqlcommand(SELECT extensions FROM tab)</add>
<remove>.ex3|.ex4</remove>
</videoextensions>
Reply
#2
If you know what you're doing with SQL, surely generating an XML file is simple. Script it.
Always read the XBMC online-manual, FAQ and search the forum before posting.
Do not e-mail XBMC-Team members directly asking for support. Read/follow the forum rules.
For troubleshooting and bug reporting please make sure you read this first.


Image
Reply
#3
alright, how can i get my own command to execute in an xml file?

like the sqlcommand:
return value = text
parameter = text
usage: connection to a database

can i manage that with a python script? or do i have to get into the sourcecode? (any clue in which file?)
Reply
#4
uhrr. you do the sql outside and then use sed or whatever to replace some placeholder in a template file.
Reply
#5
@spiff
i thought of that way too, but then i'd have to do that every couple of minutes over a cronjob. but it will be the easiest way for sure.
but it will also cause a lot of load.

and will xbmc notice the new XML file when the cronjob executes after xbmc is already started? (or will the xml file only be loaded once xbmc starts and will then be cached?)
Reply
#6
only loaded on startup. so no point in doing it anywhere except in your xbmc startup script. unless you throw in a http api to reload the profile that is
Reply
#7
the http api sounds like a nice solution.

so i could say "http://xbox/xbmcCmds/xbmcHttp?command=ReloadSkin()"

but this would mess up my playback when i am currently watching tv.

is there a command to reload a single xml file? or delete the cache to force xbmc to reload the specific xml file?
Reply
#8
skin files are loaded every time you enter a window (with a few exceptions). never once did i mention reloadskin(). you want to change advancedsettings.xml by the looks of it - that is certainly no skin file.
Reply
#9
@spiff
changing the advancedsettings would also be nice, but the most important thing is to change a skin file (video, music ...) so if those are always loaded when i enter a new window, everythings fine Laugh
thanks a lot spiff!
Reply
#10
I'm just curious, what is the purpose of doing it dynamically this way?
What are you trying to accomplish?

Christian...
Reply

Logout Mark Read Team Forum Stats Members Help
Dynamic generated XML's ?0