Python Forum
Search Results
Post Author Forum Replies Views Posted [asc]
    Thread: Parse XML - how to handle deep levels/hierarchy
Post: RE: Parse XML - how to handle deep levels/hierarch...

Thanks. And, this works great. Provides a lot of valuable details. thanks again!
dwill General Coding Help 8 9,394 Apr-17-2018, 04:17 PM
    Thread: Parse XML - how to handle deep levels/hierarchy
Post: RE: Parse XML - how to handle deep levels/hierarch...

Hello - This looks great, amazing. I was going to try it out, but i need to find that XMLpaths module that you import/reference. I cannot seem to find it...which is strange to me. I was searching ...
dwill General Coding Help 8 9,394 Apr-17-2018, 06:13 AM
    Thread: Parse XML - how to handle deep levels/hierarchy
Post: RE: Parse XML - how to handle deep levels/hierarch...

Thanks. I guess I didn't think of the threads being the same subject. But, I see your point. In the future, I will add questions to the same thread if they are on the same overall subject. And, sor...
dwill General Coding Help 8 9,394 Apr-16-2018, 05:14 PM
    Thread: Parse XML - how to handle deep levels/hierarchy
Post: RE: Parse XML - how to handle deep levels/hierarch...

Sorry to have upset you or caused you to have a bad day. I did try your code from the other post and it only produced the root level and the level below. I tried to modify it for the types of files...
dwill General Coding Help 8 9,394 Apr-16-2018, 02:04 AM
    Thread: Parse XML - how to handle deep levels/hierarchy
Post: Parse XML - how to handle deep levels/hierarchy

Hello all - I am parsing some xml files and the hierarchy can be shallow or very deep. I need to check each level Root -> Parent -> Child -> sub-child -> sub-sub-child...etc to determ...
dwill General Coding Help 8 9,394 Apr-15-2018, 11:29 PM
    Thread: how to read data from xml file
Post: RE: how to read data from xml file

Hi I changed your code to the below. I used the "parse" method/function to parse the xml file into the "tree" object. Also, I put the source file in my temp folder..but you can change that back to...
dwill Web Scraping & Web Development 7 5,234 Apr-14-2018, 06:39 AM
    Thread: how to read data from xml file
Post: RE: how to read data from xml file

Hi.. You have: if (attr.tag==author'):...but looks like you left off a single quote before author? should be: if (attr.tag=='author'):
dwill Web Scraping & Web Development 7 5,234 Apr-13-2018, 04:09 PM
    Thread: Parse XML with Namespaces
Post: RE: Parse XML with Namespaces

Hi - So, this is what I ended up with to get two of the items from this connection manager list: cnxn_string = root.xpath('XYZ:ConnectionManagers/XYZ:ConnectionManager/XYZ:ObjectData/XYZ:Connection...
dwill General Coding Help 7 20,352 Apr-12-2018, 09:22 PM
    Thread: Parse XML with Namespaces
Post: RE: Parse XML with Namespaces

Hi - This is much better than what I was using. I had for loop and was getting each connection string, but I was navigating down the xml hierarchy. Your method gets right to the place I need, and b...
dwill General Coding Help 7 20,352 Apr-12-2018, 08:08 PM
    Thread: Parse XML with Namespaces
Post: RE: Parse XML with Namespaces

Hello - Thanks so much. I just did a quick test and this works great. I will try it on a few other parts of the xml file as well. One question, as a test, I changed to using lxml and the same code ...
dwill General Coding Help 7 20,352 Apr-12-2018, 04:10 PM
    Thread: Parse XML with Namespaces
Post: RE: Parse XML with Namespaces

Hi - Thanks so much for the help. I will give this a try and update this post as things happen. thanks...
dwill General Coding Help 7 20,352 Apr-12-2018, 03:25 AM
    Thread: Parse XML with Namespaces
Post: Parse XML with Namespaces

Hello All - I am trying to parse some xml files that are saturated with Namespaces. I have been able to parse XML files without namespaces. I have found several articles online on parsing with Names...
dwill General Coding Help 7 20,352 Apr-11-2018, 09:51 PM

User Panel Messages

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