Python Forum
Search Results
Post Author Forum Replies Views Posted [asc]
    Thread: How to display XML tree structure with Python?
Post: RE: How to display XML tree structure with Python?

...not quite. Need to replace siblings[last_level] = 0with siblings[this_level+1:] = [0] * (len(siblings) - this_level - 1)That should now be it. Hopefully. **rolleyes**
mreshko Web Scraping & Web Development 13 42,210 Aug-12-2020, 02:05 PM
    Thread: How to display XML tree structure with Python?
Post: RE: How to display XML tree structure with Python?

For those who might be interested, I've added a few things to the code, so now it displays the siblings number, e.g. 1 in "3.1", the text value from the element, and the number of identical siblings. ...
mreshko Web Scraping & Web Development 13 42,210 Aug-12-2020, 01:03 PM
    Thread: How to display XML tree structure with Python?
Post: RE: How to display XML tree structure with Python?

Hi sonicblind. Great code! Very useful. Thank you. It would be great if you could add these two feature to the code: (1) show the child's' number after the level, e.g. 3.0: occupa...
mreshko Web Scraping & Web Development 13 42,210 Aug-12-2020, 08:51 AM

User Panel Messages

Announcements
Announcement #1 8/1/2020
Announcement #2 8/2/2020
Announcement #3 8/6/2020