Python元素树xml解析创建对象

发布于 2024-12-11 13:44:34 字数 696 浏览 3 评论 0原文

可能的重复:
从 xml 创建 python 对象表示的模块
使用 Python 在 Appengine 中解析 xml 的最佳方法 < /p>

使用 任何人都指出我执行以下操作的正确方向:

-我有一个 xml 文件和 xsd

-我正在使用 python 和元素树

-我已经针对 xsd 验证了 xml

-我想知道创建的好方法是什么对象来自XML?我想读取 xml,并创建一个对象(基于标签),将信息添加到该对象,然后希望将该对象放入数据库中。

任何值得赞赏的链接或想法。 (我也在使用谷歌应用引擎)

Possible Duplicate:
module to create python object representation from xml
Best way to parse xml in Appengine with Python

Can anyone point me in the right direction for doing the following:

-I have an xml file and xsd

-I'm using python and element tree

-I already validated the xml against the xsd

-I want to know, what are good ways of creating objects from the xml? I want to read the xml, and create an object (based on the tag) add the info to the object, and then hopefully put that object in the database.

Any links or ideas to get appreciated. (I'm using google app engine too)

如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。

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

发布评论

需要 登录 才能够评论, 你可以免费 注册 一个本站的账号。
列表为空,暂无数据
我们使用 Cookies 和其他技术来定制您的体验包括您的登录状态等。通过阅读我们的 隐私政策 了解更多相关信息。 单击 接受 或继续使用网站,即表示您同意使用 Cookies 和您的相关数据。
原文