lxml XMLSyntaxError: Namespace default prefix was not found

后端 未结 2 1391
生来不讨喜
生来不讨喜 2021-01-26 14:12

I am using lxml to read my xml file. I am using a code something like below. It works just fine with lxml2.3 beta1, but with lxml2.3 it gives me zn xml syntax error as shown bel

2条回答
  •  无人共我
    2021-01-26 15:14

    default namespace problems most often arise when you are attempting xpath expression. For just parsing the stream as in your sample, 2.3.0 should work fine with an unnamed default namespace.

    Perhaps you should post the smallest possible xml file that gives this error (line 545 is pretty deep into the file to have this error)

提交回复
热议问题