Is there a switch to ignore undefined namespace prefixes in LXML?

后端 未结 1 821
南旧
南旧 2021-02-06 05:04

I\'m parsing a non-compliant XML file (Sphinx\'s xmlpipe2 format) and would like LXML parser to ignore the fact that there are unresolved namespace prefixes.

An example

1条回答
  •  情歌与酒
    2021-02-06 06:03

    Add xmlns:sphinx="bogus" to the root element.

    0 讨论(0)
提交回复
热议问题