Parsing XML file deletes whitespace. How to avoid it?

This page summarizes the projects mentioned and recommended in the original post on /r/learnpython

InfluxDB – Built for High-Performance Time Series Workloads
InfluxDB 3 OSS is now GA. Transform, enrich, and act on time series data directly in the database. Automate critical tasks and eliminate the need to move data externally. Download now.
www.influxdata.com
featured
SaaSHub - Software Alternatives and Reviews
SaaSHub helps you find the best software and product alternatives
www.saashub.com
featured
  1. CPython

    The Python programming language

    If I read this correctly this behavior appears to be a bug that has seemingly been fixed for Python 3.9. What's your Python version?

  2. InfluxDB

    InfluxDB – Built for High-Performance Time Series Workloads. InfluxDB 3 OSS is now GA. Transform, enrich, and act on time series data directly in the database. Automate critical tasks and eliminate the need to move data externally. Download now.

    InfluxDB logo
  3. lxml

    The lxml XML toolkit for Python

    I got curious about this now so I did some tests on my own, and it appears that the XML parser implementation in Python does indeed strip all newline characters from attributes. Whether this is according to XML standard I do not know; I also briefly tried an alternative XML implementation for Python and it behaves the same, so I would assume that this is standard behavior, but I'm not knowledgable enough about XML to say for certain.

NOTE: The number of mentions on this list indicates mentions on common posts plus user suggested alternatives. Hence, a higher number means a more popular project.

Suggest a related project

Related posts

  • Release 0.44.0 of Spellcheck (GitHub) Action - baby-steps maintenance

    5 projects | dev.to | 25 Oct 2024
  • Show HN: Finic – open-source platform for building browser automations

    10 projects | news.ycombinator.com | 17 Sep 2024
  • GitHub – GSA/code-gov: An informative repo for all Code.gov repos

    12 projects | news.ycombinator.com | 9 Sep 2023
  • What's your favorite alternative to bleach for sanitizing HTML?

    3 projects | /r/django | 6 Jun 2023
  • I wrote a markdown to html converter

    6 projects | /r/golang | 1 Feb 2023

Did you know that Python is
the 2nd most popular programming language
based on number of references?