有什么不对?请有人说我必须写什么而不是application/x-abiwordAbiWord。python:print(''。join(doc.xpath('// text()'))
Python 3.2.3 (default, Apr 11 2012, 07:15:24) [MSC v.1500 32 bit (Intel)] on win32
Type "copyright", "credits" or "license()" for more information.
>>> f=open('a.abw','r').read()
>>> from lxml import etree
>>> doc=etree.fromstring
>>> from lxml import html
>>> doc=html.fromstring
>>> doc
<function fromstring at 0x0113B858
>>> print(''.join(doc.xpath('//text()'))
application/x-abiwordAbiWord
SyntaxError: invalid syntax
您没有关闭“(”在您的打印 – AlbertFerras
这不是问题,问题是与“应用程序” – nikita23
*什么*问题与“应用程序”?你想用它做什么?它是什么意思? –