Parsing XML with Namespaces with Python (xml.etree.ElementTree)

  Рет қаралды 19,242

fcento

3 жыл бұрын

Example of approach for XML data with Namespaces using Python xml.etree.ElementTree
Reference: docs.python.org/3/library/xml.etree.elementtree.html
Previous video, overview of the Python xlm.etree.ElementTree module: kzfaq.info/get/bejne/mL2WdKdo3KfKf30.html

Пікірлер: 31
@AlvaroMelchor
@AlvaroMelchor 2 жыл бұрын
Thanks, it's very clear, most of the tutorials cover only the non namespaces xml
@IMMORTALmen
@IMMORTALmen 2 жыл бұрын
Thank you! Spended almost two days trying to resolve namespace issue, and than found this video, thank you.
@adrianwalker9917
@adrianwalker9917 3 жыл бұрын
This was EXACTLY what I was looking for but I didn't know it. Thank you!!
@jezhayes
@jezhayes Жыл бұрын
Thank yopu so much, I was beginning to think I was cursed to manually write a text parser for these xml files forever.
@saranya548
@saranya548 9 ай бұрын
Thank you Francesco for explaining this concept so easily with a demo.
@maloman1989
@maloman1989 2 жыл бұрын
Really cristal clear tutorial, I understand a lot of things I dindn't understand on XML namespaces, Thanks a lot Guy!
@5328csabi
@5328csabi Жыл бұрын
Tried to find a solutuion on stackoverflow and other pages, and this video was the solution, good examples, good explanation with actual codes run. Thank you!
@stevemorse5052
@stevemorse5052 Жыл бұрын
Francesco, thank you. Thanks to you I now somewhat understand what is happening in the XML file I have, I did not know that is contained name spaces. Within the first 6 minutes, I am writing this before I have read the comments or watched the whole video. You have saved me hours of coding as I was going to write my own parser. All the other video sorta, kinds, neglected this small detail! Now after reading the comments, I see you have helped a LOT of people, thank you again.
@LukasNachtigall
@LukasNachtigall 2 жыл бұрын
Hey man! You just helped me to finish my parser! I do not know how, but I finally was able to find and change a text in each specific element in my XML file. I still do not understand, why I have to register the namespace, but it did the work perfectly. Your vide was really helpful. I didn't understood 70% of it for the 1st time, but now it's more clear to me. Thanks man!
@fcento
@fcento 2 жыл бұрын
Glad I could help!
@davidjnevin
@davidjnevin Жыл бұрын
Really excellent explanation. Thank you so much.
@ShivModiShankar
@ShivModiShankar 5 ай бұрын
Thanks for saving my day Francesco :)
@GuitFishN
@GuitFishN 2 жыл бұрын
This was a huge help. Thank you!
@thomasloia8874
@thomasloia8874 2 жыл бұрын
Superb, exactly what I needed to know. Thank you
@andrewbourne2296
@andrewbourne2296 2 жыл бұрын
That was SO helpful Dude. Thank you so much.
@tessdejaeghere6972
@tessdejaeghere6972 2 жыл бұрын
Super helpful, thanks a lot!
@narayanamurthyuppala6049
@narayanamurthyuppala6049 Жыл бұрын
Thanks a lot. It saved lot of my time
@RS-el7iu
@RS-el7iu 3 жыл бұрын
very helpful.... thank u ❤
@maxnoish
@maxnoish 2 жыл бұрын
Brilliant !!!
@xpanded4806
@xpanded4806 3 жыл бұрын
Thanks a lot
@AnEngineeringGirl
@AnEngineeringGirl 6 ай бұрын
After editing the xml file, I don't want the ns tag in each line. What should I do?
@nealrutgerskid
@nealrutgerskid Жыл бұрын
thank you
@sreepulipaka4918
@sreepulipaka4918 3 жыл бұрын
Can you help me with how to search absolute XPath in a xml that has name spaces as I donot want to implement code with relative path.
@equipagescatamaranlangrune8331
@equipagescatamaranlangrune8331 Жыл бұрын
Nice job Francesco, thank you. I do have a question regarding your last example. How do you get x.tag without the namespace in it ?
@KiviliG
@KiviliG 3 жыл бұрын
Can this be done with beautifulsoup?
@mihailazarescu1297
@mihailazarescu1297 3 жыл бұрын
Next time, please try to make your videos for phone users too. Thanks!
@nk461
@nk461 10 күн бұрын
What the font bro? 😅 Can't read, I think I am too old
@fcento
@fcento 10 күн бұрын
😅
@Gamer-mg6my
@Gamer-mg6my 2 жыл бұрын
Hi. I have this xmlns and i tried every solution and i can't read the XML with this namespace: ..... Some idea to solve this? :/ it is a xml, but the extension file is .vdx
@fcento
@fcento 2 жыл бұрын
Not enough information. What error do you get?
@Gamer-mg6my
@Gamer-mg6my 2 жыл бұрын
@@fcento hi thank you very much for your contributions, don't know why a while ago didn't compile but now it works, finally i do it with the solution that you recommended us on second 14:20
Викторина от МАМЫ 🆘 | WICSUR #shorts
00:58
Бискас
Рет қаралды 2,7 МЛН
WORLD'S SHORTEST WOMAN
00:58
Stokes Twins
Рет қаралды 68 МЛН