Python Forum
Using xpath to get value of a nested element name using tag named
Thread Rating:
  • 0 Vote(s) - 0 Average
  • 1
  • 2
  • 3
  • 4
  • 5
Using xpath to get value of a nested element name using tag named
#1
I have a nested XML tag file that parses correctly with elementtree.

I have been unable to find a method of getting the text value for an element nested in the file.

If I do a for loop I can do a findall and retrieve my values but would like to use a static mapping to get the data as it will be much more efficient.

Can anyone please tell me how to do this?
Reply


Messages In This Thread
Using xpath to get value of a nested element name using tag named - by xq1xq1xq1 - Jan-17-2019, 10:40 PM

Possibly Related Threads…
Thread Author Replies Views Last Post
  XPATH element does not change its value Martinelli 0 1,301 Oct-06-2019, 07:02 PM
Last Post: Martinelli
  Unable to locate element no such element gahhon 6 4,726 Feb-18-2019, 02:09 PM
Last Post: gahhon
  Replace element in a nested list nagymusic 4 18,150 Nov-19-2018, 08:03 PM
Last Post: nilamo
  Newbie question for sum the specific element in named tuple zydjohn 1 4,324 Dec-12-2017, 07:29 PM
Last Post: buran
  Change single element in 2D list changes every 1D element AceScottie 9 12,490 Nov-13-2017, 07:05 PM
Last Post: Larz60+
  Zip on single element in nested sequence. rhubarbpieguy 14 8,498 Jul-01-2017, 06:10 PM
Last Post: micseydel

Forum Jump:

User Panel Messages

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