2005年04月28日 星期四 14:31
limodou,您好! 不是格式的问题,这个文件是我直接拷贝过来的。异常信息: >>> xmldoc = minidom.parse("d:\\python\\xml\\book.xml") Traceback (most recent call last): File " 4 Python 测试 Zope ", line 1, in -toplevel- xmldoc = minidom.parse("d:\\python\\xml\\book.xml") File "C:\Python24\lib\xml\dom\minidom.py", line 1915, in parse return expatbuilder.parse(file) File "C:\Python24\lib\xml\dom\expatbuilder.py", line 924, in parse result = builder.parseFile(fp) File "C:\Python24\lib\xml\dom\expatbuilder.py", line 207, in parseFile parser.Parse(buffer, 0) ExpatError: not well-formed (invalid token): line 7, column 22 ======= 2005-04-28 13:17:36 您在来信中写道:======= >在05-4-28,皮大庆<Pidaqing at mail.iame.cn> 写道: >> Zoom Quiet,您好! >> >> 我将gb2312去掉了,可为什么文件里出现中文出现异常: >> ExpatError: not well-formed (invalid token): line 7, column 21。 > >这种错误是说你的xml文件格式不正确。比如属性没有加上双引号,标签没有结束什么的。它已经指出你的文件是多少行,多少列错误了。看一看吧。 > >> 只要xml文件里没有中文,就正常了。 >> > >-- >I like python! >My Donews Blog: http://www.donews.net/limodou >New Google Maillist: http://groups-beta.google.com/group/python-cn >_______________________________________________ >python-chinese list >python-chinese at lists.python.cn >http://python.cn/mailman/listinfo/python-chinese > = = = = = = = = = = = = = = = = = = = = 致 礼! 皮大庆 Pidaqing at mail.iame.cn 2005-04-28
2005年04月28日 星期四 14:50
xqS088fsOg0KDQoJztLWrsew0rLT9rW9uf3V4rj2zsrM4qOsv8nE3MrH0vLOqm1pbmlkb23Wu9an s9Z1dGYtOLXIydnK/by41tax4MLroaPO0rXEveK+9rDst6jKx6OstsHI69X7uPbOxLz+o6y1q7K7 tsHI67Xa0rvQ0Ly0PD94bWwgdmVyc2lvbj0iMS4wIiBlbmNvZGluZz0iZ2IyMzEyIiA/PqOsyLu6 87DRyKuyv87Esb62vNequ6/OqnV0Zi04o6zU2dPDcGFyc2VTdHJpbme31s72vLS/yaOsvs3Du9PQ zsrM4q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bCDQo+wPGjoQ0KPiANCj4JCQkJIA0KPqGhoaGhoaGhoaGh oaGhoaHGpLTzx+wNCj6hoaGhoaGhoaGhoaGhoaGhUGlkYXFpbmdAbWFpbC5pYW1lLmNuDQo+oaGh oaGhoaGhoaGhoaGhoaGhoaEyMDA1LTA0LTI4DQo+DQo+X19fX19fX19fX19fX19fX19fX19fX19f X19fX19fX19fX19fX19fX19fX19fX18NCj5weXRob24tY2hpbmVzZSBsaXN0DQo+cHl0aG9uLWNo aW5lc2VAbGlzdHMucHl0aG9uLmNuDQo+aHR0cDovL3B5dGhvbi5jbi9tYWlsbWFuL2xpc3RpbmZv L3B5dGhvbi1jaGluZXNlDQo+DQoNCj0gPSA9ID0gPSA9ID0gPSA9ID0gPSA9ID0gPSA9ID0gPSA9 ID0gPQ0KCQkJDQoNCqGhoaGhoaGhoaGhoaGhoaFCcnVjZSBXaG8NCqGhoaGhoaGhoaGhoaGhoaF3 aG9vbmxpbmVAbXNuLmNvbQ0KoaGhoaGhoaGhoaGhoaGhoaGhoaEyMDA1LTA0LTI4DQoNCg==
2005年04月28日 星期四 15:04
我试了一下,那是因为你没有把xml文件按utf-8编码保存。 在05-4-28,皮大庆<Pidaqing at mail.iame.cn> 写道: > limodou,您好! > 不是格式的问题,这个文件是我直接拷贝过来的。 > >> 4 >- >
Python >- >
测试 > > >- >
Zope > > > 异常信息: > >>> xmldoc = minidom.parse("d:\\python\\xml\\book.xml") > > Traceback (most recent call last): > File "", line 1, in -toplevel- > xmldoc = minidom.parse("d:\\python\\xml\\book.xml") > File "C:\Python24\lib\xml\dom\minidom.py", line 1915, in parse > return expatbuilder.parse(file) > File "C:\Python24\lib\xml\dom\expatbuilder.py", line 924, in parse > result = builder.parseFile(fp) > File "C:\Python24\lib\xml\dom\expatbuilder.py", line 207, in parseFile > parser.Parse(buffer, 0) > ExpatError: not well-formed (invalid token): line 7, column 22 > > ======= 2005-04-28 13:17:36 您在来信中写道:======= > > >在05-4-28,皮大庆<Pidaqing at mail.iame.cn> 写道: > >> Zoom Quiet,您好! > >> > >> 我将gb2312去掉了,可为什么文件里出现中文出现异常: > >> ExpatError: not well-formed (invalid token): line 7, column 21。 > > > >这种错误是说你的xml文件格式不正确。比如属性没有加上双引号,标签没有结束什么的。它已经指出你的文件是多少行,多少列错误了。看一看吧。 > > > >> 只要xml文件里没有中文,就正常了。 > >> > > > >-- > >I like python! > >My Donews Blog: http://www.donews.net/limodou > >New Google Maillist: http://groups-beta.google.com/group/python-cn > >_______________________________________________ > >python-chinese list > >python-chinese at lists.python.cn > >http://python.cn/mailman/listinfo/python-chinese > > > > = = = = = = = = = = = = = = = = = = = = > > 致 > 礼! > > > 皮大庆 > Pidaqing at mail.iame.cn > 2005-04-28 > > > _______________________________________________ > python-chinese list > python-chinese at lists.python.cn > http://python.cn/mailman/listinfo/python-chinese > > > -- I like python! My Donews Blog: http://www.donews.net/limodou New Google Maillist: http://groups-beta.google.com/group/python-cn
2005年04月28日 星期四 15:08
06a4w8rHtsXOxMm9t63S67XEsMmjrNT1w7Sx5LPJxqS088fswcujvwoK1NowNS00LTI4o6xCcnVj ZSBXaG88d2hvb25saW5lQG1zbi5jb20+INC0tcCjugo+IMaktPPH7DoKPiAKPiAgICAgICAgIM7S 1q7HsNKy0/a1vbn91eK49s7KzOKjrL/JxNzKx9LyzqptaW5pZG9t1rvWp7PWdXRmLTi1yMnZyv28 uNbWseDC66GjztK1xL3ivvaw7LeoysejrLbByOvV+7j2zsS8/qOstauyu7bByOu12tK70NC8tDw/ eG1sIHZlcnNpb249IjEuMCIgZW5jb2Rpbmc9ImdiMjMxMiIgPz6jrMi7uvOw0cirsr/OxLG+trzX qruvzqp1dGYtOKOs1NnTw3BhcnNlU3RyaW5nt9bO9ry0v8mjrL7Nw7vT0M7KzOKhowo+IAo+ICAg ICBCVFejrM7S1q7HsL+0uf3E47XExMexvnB5dGhvbta4xM+howo+IAo+ID09PT09PT0gMjAwNS0w NC0yOCAxMzowNjo0OSDGpLTzx+wgd3Jv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