Python 2.5: ElementTree and UML in XML

前端 未结 2 629
我在风中等你
我在风中等你 2021-01-25 19:58

I\'m working with an XML file which represent an UML model. Here is an example of what it is:




        
2条回答
  •  旧巷少年郎
    2021-01-25 20:33

    register_namespace is only available since Python 2.7

    There might be another way to preserve namespaces with ElementTree in 2.5, but I'm not aware of it.

    Alternatively, you could try another parsing library. lxml preserves namespaces and its API is compatible with ElementTree.

提交回复
热议问题