lxml XMLSyntaxError: Namespace default prefix was not found

后端 未结 2 1510
谎友^
谎友^ 2021-01-26 14:11

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:03

    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)

提交回复
热议问题