在谷歌应用程序引擎上使用python根据DTD验证XML

发布于 2024-08-07 23:02:58 字数 243 浏览 2 评论 0原文

我已经使用 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 技术交流群。

扫码二维码加入Web技术交流群

发布评论

需要 登录 才能够评论, 你可以免费 注册 一个本站的账号。

评论(1

孤城病女 2024-08-14 23:02:58

编译的 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.

~没有更多了~
我们使用 Cookies 和其他技术来定制您的体验包括您的登录状态等。通过阅读我们的 隐私政策 了解更多相关信息。 单击 接受 或继续使用网站,即表示您同意使用 Cookies 和您的相关数据。
原文