Ok, this should be simple, but I cant figure it out. How do I add a namespace to an already created element?
If I have:
myxml = '<?xml version='1.0' encoding='UTF-8' standalone='yes'?>
<p:obj xmlns:p="http://schemas.openxmlformats.org/presentationml/2006/main">
<p:part>Part1</p:part></p:obj>'
root = XML(myxml)
Using lxml, how do I add the additional namespace?
xmlns:a="http://schemas.openxmlformats.org/drawingml/2006/main"
So the result xml should look like:
<?xml version='1.0' encoding='UTF-8' standalone='yes'?>
<p:obj xmlns:p="http://schemas.openxmlformats.org/presentationml/2006/main" xmlns:a="http://schemas.openxmlformats.org/drawingml/2006/main">
<p:part>Part1</p:part></p:obj>`
Please note that I need to add to an already created element.