I am pretty new to Python, just finishing up a college class on it, and am also working through a book called "Head First Python", so I have a good basic understanding of the language but I need some help with a task that is a bit over my head. I have an XML file that my companies CAD software reads in to assign the correct material to a 3D solid model, in our case assigning a material name and density. However, this XML has its units in lbf.s^2/in^4 but it's been requested that they be in lbm/in^3 by one of our customers.
Can I import the XML into Python and iterate through it to change the values?
The first would be the material unit name itself, I would need to iterate through the XML and replace every instance of this:
    <PropertyData property="MassDensity_0">
With this:
    <PropertyData property="MassDensity_4">
Then for every instance found of MassDensity_0 I would need to multiply the density value by a conversion value to get the correct density value in the new units. As you can see below, the data values like the one you see below would need to be multiplied by a conversion factor.
        <PropertyData property="MassDensity_0">
            <Data format="exponential">
            7.278130e-04</Data>
        </PropertyData>
Does it make sense to attempt this in Python? There are over a hundred materials in this file, and editing them manually would be very tedious and time-consuming. I'm hoping Python can do the heavy lifting here.
I appreciate any assistance you can provide and thank you in advance!!!