Most of the plugins here are made by B3 users and the authors may not visit frequently. If you need support for plugins or if questions remain unanswered, you will have to contact the author directly. Read the full Support Disclaimer here
NOTE: Do not attach plugins to your forumtopics! Attachements are periodically removed by maintenance tasks. Upload your plugins to our Downloads section instead!

You are here: Big Brother Bot ForumAdd-OnsPlugins Discussion (Moderator: MordyT)Retrieve Lists From XML?
Pages: [1]   Go Down
  Print  
Author Topic: Retrieve Lists From XML?  (Read 206 times) Bookmark and Share
Full Member
***
OS: Windows
Type: Owner dedicated server(s)
Gameservers: CoD4, CoD6, CoD7
Posts: 80
Offline Offline
Currently hosting 40+ b3 Bots!!!
WWW
« on: August 22, 2011, 12:18:37 PM »

I'm not sure if this is the proper place to post this, but here we go (please move if needed).  I am trying to figure out how to build and retrieve lists from the xml file for plugins.  My friend and I looked through the ElementTree.py file and tried several of the commands we found there, but none seemed to work..we kept getting errors such as this: "Error loading plugin: XmlConfigParser instance has no attribute 'findall'".

What are we doing wrong?  Is it possible to get lists from an xml file for b3 plugins, and if so how do we do it?  Here is an example xml file that we are testing:

Code:
<configuration plugin="test">
    <settings name="tags">
<set name="tag">pRo]</set>
<set name="tag">pRo}</set>
<set name="tag">pRo)</set>
        </settings>
</configuration>

We want all of the variables ("pRo]", "pRo}", etc) in the "tags" section to be made into a list/sequence so we can iterate through them using a for or while loop.  Any ideas?  Thanks for the help.

Brendan "NinjaNife" West
Logged

Dev. Team
*
OS: Windows
Type: Gameserver Rental Co.
Gameservers: COD2,COD4,COD5
Posts: 1098
Offline Offline
« Reply #1 on: August 22, 2011, 02:49:16 PM »

I am not sure, but I don't think you will be able to have 3 name="tag" statements without them interfering with one another.

Why not try a taglist, with the tags separated by a space and then parse the retrieved xml list to separate them out to put into a Python list?
Logged
Full Member
***
OS: Windows
Type: Owner dedicated server(s)
Gameservers: CoD4, CoD6, CoD7
Posts: 80
Offline Offline
Currently hosting 40+ b3 Bots!!!
WWW
« Reply #2 on: August 22, 2011, 03:37:31 PM »

I am not sure, but I don't think you will be able to have 3 name="tag" statements without them interfering with one another.

Why not try a taglist, with the tags separated by a space and then parse the retrieved xml list to separate them out to put into a Python list?
Could you give an example of that?  I am having trouble visualizing it lol.  Thanks for the reply.

Brendan "NinjaNife" West

*EDIT*
My friend showed me how to do it and we got it working.  Thanks for the idea!
« Last Edit: August 24, 2011, 12:01:12 PM by NinjaNife » Logged
Tags:
Pages: [1]   Go Up
  Print  
 
Jump to:  


Rate this page +1 at Google Search


SimplePortal 2.3.1 © 2008-2009, SimplePortal