473,383 Members | 1,879 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,383 software developers and data experts.

How to build a tree and bind data for a list just by one file XML???

Hi!
I'm working with a GUI ( python coded ). In it, i need to build a treeview and a list that only use 1 file XML. So how i can do it?
ex: i have a file XML like that:
<node1>
<id>01</id>
<name>Hello</name>
.....
</node1>
<node2>
<id>02</id>
<name>Hello</name>
.....
</node2>
...........
In that, i use <node1>,<node2>,..for the tree view, and <id>,<name>,..for the list.
So are there any idea to solve it?

Thanks,
Sep 28 '07 #1
4 1430
bartonc
6,596 Expert 4TB
I infer from this that you mean Tkinter is your GUI framework. Is that correct?

If so, you'll probably find that Tkinter lacks many widgets and a TreeView is one of the missing widgets.

IMO, the best GUI framework for your needs is wxPython.
Sep 28 '07 #2
Thanks!
Now i'm using Wing IDE and wxPython for GUI python coding. When i use xml.Parser.expat lib to work with XML file for build tree, it load all item in that file but i only want use the main item to build tree and other item to bind to the list.
Sep 28 '07 #3
bartonc
6,596 Expert 4TB
Thanks!
Now i'm using Wing IDE and wxPython for GUI python coding. When i use xml.Parser.expat lib to work with XML file for build tree, it load all item in that file but i only want use the main item to build tree and other item to bind to the list.
Sounds like you a well on your way with the Python side of things.
This may be more of an XML skills issue. If you post some of the XML part of your code then, perhaps, we'll be able to show you how to "slice" off the part of the data that is useful to you.
Sep 30 '07 #4
Hi,
Now i give you the pic for what i want to do:




And here are my XML contents:
<?xml version="1.0">
<HTTP>
<HTTP_01>
<Run>"1"</Run>
<TestCases>"HTTP_01.........."</TestCases>
<Result>"N/A"</Result>
<Comments>""</Comments>
<HTTP_02>
<Run>"1"</Run>
<TestCases>"HTTP_02.........."</TestCases>
<Result>"N/A"</Result>
<Comments>""</Comments>
<HTTP_03>
<Run>"1"</Run>
<TestCases>"HTTP_03.........."</TestCases>
<Result>"N/A"</Result>
<Comments>""</Comments>
</HTTP>


So, what should i do?

Thanks,
Oct 1 '07 #5

Sign in to post your reply or Sign up for a free account.

Similar topics

10
by: Douglas Buchanan | last post by:
I am using the following code instead of a very lengthly select case statement. (I have a lot of lookup tables in a settings form that are selected from a ListBox. The data adapters are given a...
0
by: pcgxk | last post by:
Due to some bugs in .NET SP1 which we are currently review with MS under separate cover, I am having to regress the patching levels of several of my desktops to rebuild and retest several versions...
10
by: dwok | last post by:
Does anyone know of a good article that discusses creating a "Tree View" control in ASP.NET? Or perhaps a Tree View Control that comes with source code? I have come across a lot of tree controls...
4
by: Ken | last post by:
I have a binary tree in VB NET and insertions seem to be slow. The program receives data from one source and inserts it into the tree. The program receives data from another source and...
5
by: Pavan | last post by:
My goal is to accomplish the tooltip functionality for all the neodes in a tree view and i have the following three Events in my C# application. Name of my TreeView Control (AITreeView) 1)...
3
by: NickP | last post by:
Hi there, Today I try to compile an application of mine and I am getting a whole list of bizaar errors.... ------------------------------------------------ Error 1 The...
1
by: w.p. | last post by:
Hello! I have some trouble with my GUI. I have left panel with foldpanelbar, but i need one item but not collapsed - simple button. I split my left panel into two foldpanelbars with one button...
1
by: jodleren | last post by:
Hello! I need a tree (of folders), can anyone give me some ideas/input, how do I control collapse, explode etc? Showing the entire tree will be too much, so I need to show a part of it...
0
tuxalot
by: tuxalot | last post by:
I have a text file showing files in directories. The text file looks like this: "C:\folderA\file1.zip" "C:\folderA\folderB\folderC\file2.zip" "C:\folderA\folderE\folderX\folderU\file3.zip" ...
1
by: CloudSolutions | last post by:
Introduction: For many beginners and individual users, requiring a credit card and email registration may pose a barrier when starting to use cloud servers. However, some cloud server providers now...
0
by: Faith0G | last post by:
I am starting a new it consulting business and it's been a while since I setup a new website. Is wordpress still the best web based software for hosting a 5 page website? The webpages will be...
0
isladogs
by: isladogs | last post by:
The next Access Europe User Group meeting will be on Wednesday 3 Apr 2024 starting at 18:00 UK time (6PM UTC+1) and finishing by 19:30 (7.30PM). In this session, we are pleased to welcome former...
0
by: ryjfgjl | last post by:
In our work, we often need to import Excel data into databases (such as MySQL, SQL Server, Oracle) for data analysis and processing. Usually, we use database tools like Navicat or the Excel import...
0
by: ryjfgjl | last post by:
If we have dozens or hundreds of excel to import into the database, if we use the excel import function provided by database editors such as navicat, it will be extremely tedious and time-consuming...
0
by: emmanuelkatto | last post by:
Hi All, I am Emmanuel katto from Uganda. I want to ask what challenges you've faced while migrating a website to cloud. Please let me know. Thanks! Emmanuel
0
BarryA
by: BarryA | last post by:
What are the essential steps and strategies outlined in the Data Structures and Algorithms (DSA) roadmap for aspiring data scientists? How can individuals effectively utilize this roadmap to progress...
1
by: Sonnysonu | last post by:
This is the data of csv file 1 2 3 1 2 3 1 2 3 1 2 3 2 3 2 3 3 the lengths should be different i have to store the data by column-wise with in the specific length. suppose the i have to...
0
by: Hystou | last post by:
There are some requirements for setting up RAID: 1. The motherboard and BIOS support RAID configuration. 2. The motherboard has 2 or more available SATA protocol SSD/HDD slots (including MSATA, M.2...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.