在谷歌应用程序引擎上使用python根据DTD验证XML
我已经使用 lxml 在客户端进行验证,但我不太确定如何让它在 Google App Engine 上工作,因为它没有 lxml 包。我尝试复制整个 lxml 文件夹并将其放置在我的 Google 应用程序的根目录中,但似乎无法正确使用它。我猜这与编译的 .so 文件等有关。
有没有办法让 lxml 在 Google App Engine 上工作?如果没有,是否有任何其他库可用于根据适用于 Google App Engine 的 DTD 验证 XML?
I've got validation working on client side using lxml, but I'm not quite sure how to get it work on Google App Engine, since it doesn't have the lxml package. I tried copying the whole lxml folder and place it in the root of my Google application, but it seems like it cannot use it properly. I'm guessing it has to do with the compiled .so-files and such.
Is there a way to get lxml to work on Google App Engine? If not, is there any other library that you can use to validate XML against DTD that works on Google App Engine?
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。
绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(1)
编译的 C 扩展(如 lxml)将无法在 Google App Engine 上运行。
PyXML 不再维护,但它确实有一个纯 Python XML 验证器。有关示例,请参阅此代码片段。
Compiled C extensions (like lxml) will not work on Google App Engine.
PyXML is no longer maintained, but it does have a pure-Python XML validator. See this code snippet for an example.