Python中文
首页
教程
问答
标签
搜索
登录
注册
使用lxml get error EntityR读取xml文件
回答此问题可获得
20
贡献值,回答如果被采纳可获得
50
分。
<p>我使用lxml来读取一个xml文件,它的结构如下所示 在</p> <pre><code> <domain>http://www.trademe.co.nz</domain> <start>http://www.trademe.co.nz/Browse/CategoryAttributeSearchResults.aspx?search=1&cid=5748&sidebar=1&rptpath=350-5748-4233-&132=FLAT&134=&153=&29=&122=0&122=0&59=0&59=0&178=0&178=0&sidebarSearch_keypresses=0&sidebarSearch_suggested=0</start> </code></pre> <p/> <p>我的python代码是:</p> ^{pr2}$ <p>当我运行它时 <code>entityref: expecting ';'</code>错误</p> <p>但是,当我删除xml文件中的符号时,一切都正常。在</p> <p>我怎样才能解决这个错误?在</p>
0 条评论
分类:
Python问答
请先
登录
后评论
默认排序
时间排序
1 个回答
匿名
1天前
擅长:python、mysql、java
<p>将xml文件中的<code>&</code>替换为<code>&amp;</code>,否则您的xml不符合xml标准。在</p>
请先
登录
后评论
针对此问题:
更多的回答
关注
89
关注
收藏
1
收藏,
216
浏览
网友 提问于 2天前
相关Python问题
如何添加虚拟方法
4 回答
如何添加表示整数的擦边字符串?
7 回答
如何添加要在Bokeh中使用的新font.ttf文件?
9 回答
如何添加要显示的矩阵XY轴编号和XY轴
7 回答
如何添加计数?
10 回答
如何添加计数器函数?
2 回答
如何添加计数器列来计算数据帧中另一列中的特定值?
4 回答
如何添加计数器来跟踪while循环中的月份和年份?
6 回答
如何添加计数并删除countplot的顶部和右侧脊椎?
4 回答
如何添加计时器wx.应用程序更新窗口对象的主循环?
6 回答
如何添加评论到帖子?PostDetailVew,Django 2.1.5
9 回答
如何添加评论拉梅尔亚姆
10 回答
如何添加诸如矩阵Python/Pandas之类的数据帧?
8 回答
如何添加谷歌地点自动完成到Flask?
2 回答
如何添加超时、python discord bot
2 回答
如何添加超过1dp的检查
3 回答
如何添加距离方法
2 回答
如何添加跟随游戏的敌人精灵
1 回答
如何添加路径以便python可以找到程序?
4 回答
如何添加身份验证/安全性以使用happybase访问HBase?
9 回答