使用XML w / Python ... [英] Using XML w/ Python...

查看:42
本文介绍了使用XML w / Python ...的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

好的,我有这个XML文档,我对XML知之甚少,但我想要做的是b / b
要做的是XML文档的某些部分,例如< / title> blah

< / title>并采取这一点,并把文本文档。然后同样的事情

doe< / body>部分。关于它,我检查了一些xml

模块,但不明白如何使用它们。不要解析,所以如果

你可以请解释使用XML和python给我。请发送电子邮件至
jm******@gmail.com


Aim- jayjay08balla

MSN- Jm ****** @ gmail.com

Yahoo- raeraefad72

Thx

OK, I have this XML doc, i dont know much about XML, but what i want
to do is take certain parts of the XML doc, such as </title> blah
</title> and take just that and put onto a text doc. Then same thing
doe the </body> part. Thats about it, i checked out some of the xml
modules but dont understand how to use them. Dont get parsing, so if
you could please explain working with XML and python to me. Email me at
jm******@gmail.com

Aim- jayjay08balla
MSN- Jm******@gmail.com
Yahoo- raeraefad72
Thx

推荐答案

XPath是最简单的方法。


以下是一些包含XPath各种库的示例
http://www.oreillynet.com/pub/wlg/6225

在此处阅读XPath基础知识
http://www.w3schools.com/xpath/default.asp


期待人们为您编写

教程并通过电子邮件发送,这是不实际的,也许并不礼貌。网上有很多教程

。只需使用谷歌。

XPath is the least painful way of doing it.

Here are some samples with various libraries for XPath
http://www.oreillynet.com/pub/wlg/6225

Read XPath basics here
http://www.w3schools.com/xpath/default.asp

It is not practical and perhaps not polite to expect people write
tutorials just for you and send by email. There are a lot of tutorials
on the web on this. Just use Google.


是的,我知道,我确实看了一对,但我永远无法理解。

他们是对我来说很困惑,我不希望有一个完整类型的

教程,就像一些帮助我想要做的事情,而不是

整个模块...但是Watever ,对于feedbak很多。

Yes i know, i did check out a couple but i could never understand it.
They were confusing for me and i wasnt hoping for a full typed
tutorial, just like some help with excactly wat im trying to do, not
the whole module... but watever, Thx alot for the feedbak.


查看标准的python库参考

http://docs.python.org/lib/dom-example.html


handleSlide函数几乎可以做你想要的,除了你应该使用

''解析''而不是''parseString''。


--------原始消息--------

来自:" Jay" < JM ****** @ gmail.com>

收件人:

主题:回复:使用带w / Python的XML ...

日期:11/12/2005 09:33
Look at the standard python library reference

http://docs.python.org/lib/dom-example.html

the handleSlide function almost does what you want, except that you should use
''parse'' and not ''parseString''.

-------- Original Message --------
From: "Jay" <JM******@gmail.com>
To:
Subject: Re:Using XML w/ Python...
Date: 11/12/2005 09:33
是的我知道,我确实看了一对,但我永远无法理解。
他们让我感到困惑而且我不希望有一个完整的类型的教程,就像一些帮助完全按照我试图做的事情,而不是整个模块...但是Watever,Thx很多用于feedbak。
Yes i know, i did check out a couple but i could never understand it.
They were confusing for me and i wasnt hoping for a full typed
tutorial, just like some help with excactly wat im trying to do, not
the whole module... but watever, Thx alot for the feedbak.



这篇关于使用XML w / Python ...的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆