Full XML Processing Guide in Python

Sdílet
Vložit
  • čas přidán 25. 08. 2021
  • Today we learn two ways to process XML files in Python. First we talk about SAX and then about DOM.
    ◾◾◾◾◾◾◾◾◾◾◾◾◾◾◾◾◾
    📚 Programming Books & Merch 📚
    🐍 The Python Bible Book: www.neuralnine.com/books/
    💻 The Algorithm Bible Book: www.neuralnine.com/books/
    👕 Programming Merch: www.neuralnine.com/shop
    🌐 Social Media & Contact 🌐
    📱 Website: www.neuralnine.com/
    📷 Instagram: / neuralnine
    🐦 Twitter: / neuralnine
    🤵 LinkedIn: / neuralnine
    📁 GitHub: github.com/NeuralNine
    🎙 Discord: / discord
    🎵 Outro Music From: www.bensound.com/
  • Věda a technologie

Komentáře • 29

  • @deewademai
    @deewademai Před rokem +4

    The is one of the best solution of how to modify XML. I couldn't find any info online. You save me tons of time. Thank you so much.

  • @ruidian8157
    @ruidian8157 Před 2 lety +20

    If I’m not wrong, there’s a couple more module that can parse xml. One of it is xml.ElementTree which is quite easy to use. Another one is BeautifulSoup4 with lxml parser, which is easier but slower.

  • @arin3382
    @arin3382 Před 2 lety +4

    Please make a series on Assembly language.
    I absolutely love your channel. Keep making good content. ♥️

  • @DamianTera
    @DamianTera Před měsícem

    It was helpful as an introduction.
    Thank you.

  • @Dr.Cosmar
    @Dr.Cosmar Před 2 lety +2

    SAX tripped my bosses algorithm.
    Got a error response out of him, "What the hell are you watching??".

  • @Nay92nve
    @Nay92nve Před 2 lety

    Could I use these commands to get information from an XML and write another new file? I'm trying to get some information from an XML and write to json coco format.

  • @anonlegion9300
    @anonlegion9300 Před 2 lety +1

    Hey buddy, I love your channel I've learned from so much from your channel. Do you think you can do a tutorial on regex next?

  • @anilyasasvi4197
    @anilyasasvi4197 Před rokem

    thank you for the video..is there any method to process python file in xml file

  • @fidaeariyan9376
    @fidaeariyan9376 Před měsícem

    tkx for video

  • @sahanlahiru7193
    @sahanlahiru7193 Před 7 měsíci

    thank you❤

  • @philipe1502
    @philipe1502 Před 2 lety

    Danke mehrmals :) Koenntest du die People.XML Datei hochladen?

  • @JaiMiNPaTel2811
    @JaiMiNPaTel2811 Před 2 lety

    😍🙌🙌

  • @aditya_asundi
    @aditya_asundi Před 2 lety

    Hey Florian, is there any API that allows you to convert JSON to XML and vice versa?

    • @kemalcihanbastak8476
      @kemalcihanbastak8476 Před 2 lety +1

      You can use xml2json library for that

    • @fus3n
      @fus3n Před 2 lety

      if you understand both it should be easy to make your own for some simple convertion

  • @jeffspaulding9834
    @jeffspaulding9834 Před rokem +1

    I suspect the reason you're getting all the extra whitespace when you use your XML prettifier is because whitespace in XML is significant unless you're using a DTD or schema that says otherwise. So basically, all the whitespace in your original document is being preserved and passed on to the prettifier, which adds more whitespace every time you run it.
    If Python has a function to remove whitespace from cdata, you might try running that before running your prettifier function.
    (I don't use Python myself, otherwise I'd look it up. I wanted info on SAX programming in Scheme, but there's not much Scheme content on CZcams. Fortunately it seems to be language independent.)

    • @Param3021
      @Param3021 Před rokem

      yeah!
      for removing trailing white spaces, we have str.strip() function, or we can replace it manually using str.replace(' ', '')

  • @basalduat
    @basalduat Před rokem +1

    Dear NeuraNine: Your tutorials need to increase the font size to minimum of 24 or 30pts. Many of us are over 30 years of age and have poor eyesight and cheap laptops. Thanks.

  • @g2D1
    @g2D1 Před rokem

    what is the IDE you are using?

  • @jordanjones3711
    @jordanjones3711 Před rokem

    where is the example xml data

  • @KakariaHarsh
    @KakariaHarsh Před 2 lety

    :)

  • @hiepvanphong
    @hiepvanphong Před rokem

    ngon

  • @AJain-18
    @AJain-18 Před 2 lety +1

    First here !!!!

  • @IzUrBoiKK
    @IzUrBoiKK Před 2 lety +1

    Hey neural nine, I am banned from ur discord server. It can be because someone hacked my account and was sending that fake hacking nitro links everywhere. Pls unban me.