How to get this value on xml file using python? (See the xml code)
#1
This is my xml file. register.xml and This is what it inside have...

<register>
<setting id="ipkey" value="1252473100" />
</register>

How to get ipkey value using python? I think this understandable...
Reply
#2
xbmcplugin.getSetting("ipkey") ? Edit, nvm misread. It's a random xml file not plugin settings. You have to read and parse that file.
Always read the online manual (wiki), FAQ (wiki) and search the forum before posting.
Do not PM or e-mail Team-Kodi members directly asking for support. Read/follow the forum rules (wiki).
Please read the pages on troubleshooting (wiki) and bug reporting (wiki) before reporting issues.
Reply
#3
(2015-08-03, 09:26)mkortstiege Wrote: xbmcplugin.getSetting("ipkey") ? Edit, nvm misread. It's a random xml file not plugin settings. You have to read and parse that file.

I just want to get the value from a another xml file
Reply
#4
Please check the other addons. You will most likely have to use elementree to parse the xml file.
Always read the online manual (wiki), FAQ (wiki) and search the forum before posting.
Do not PM or e-mail Team-Kodi members directly asking for support. Read/follow the forum rules (wiki).
Please read the pages on troubleshooting (wiki) and bug reporting (wiki) before reporting issues.
Reply
#5
(2015-08-03, 09:41)mkortstiege Wrote: Please check the other addons. You will most likely have to use elementree to parse the xml file.

Nice Idea. Thanks... Do u know how to make a addon to open settings when we opening the addon? I will explain more

I'm trying to make a addon. I want to just open settings of the addon when we opening it. As sample

Go to Videos Addon Menu
Open my Addon
(When we press on addon it only open the settings)
Reply
#6
Sorry, i don't do python and addon coding. You better wait for someone that actually knows it.
Always read the online manual (wiki), FAQ (wiki) and search the forum before posting.
Do not PM or e-mail Team-Kodi members directly asking for support. Read/follow the forum rules (wiki).
Please read the pages on troubleshooting (wiki) and bug reporting (wiki) before reporting issues.
Reply
#7
https://docs.python.org/3/library/xml.et...ttree.html

try that should have what your looking for
Reply
#8
Use xmbcaddon.openSettings

xbmcaddon.Addon(id='plugin.video.somename').openSettings()
Reply

Logout Mark Read Team Forum Stats Members Help
How to get this value on xml file using python? (See the xml code)0