I have a question:
I am parsing an XML that has a namespace with a python xml parser ( beautifulsoup ), and when I save that xml the parser replaces: “xsi:” in the namespace with {http://www.w3.org/2001/XMLSchema-instance} how can I prevent him from doing that ?
Example:
<project xmlns="http://maven.apache.org/POM/4.0.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/maven-v4_0_0.xsd">
Becomes:
<project xmlns="http://maven.apache.org/POM/4.0.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" {http://www.w3.org/2001/XMLSchema-instance}schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/maven-v4_0_0.xsd">
Can anyone help me out with this ?
Regards,
Bojan
I’ve filed a bug for you. I’ve also committed a fix which will be in the next release of Beautiful Soup.