Skip to content

Update 6 readDocx.py --- an xml parser missing#50

Open
ZhanpengZhang wants to merge 1 commit intoREMitchell:masterfrom
ZhanpengZhang:patch-1
Open

Update 6 readDocx.py --- an xml parser missing#50
ZhanpengZhang wants to merge 1 commit intoREMitchell:masterfrom
ZhanpengZhang:patch-1

Conversation

@ZhanpengZhang
Copy link
Copy Markdown

@ZhanpengZhang ZhanpengZhang commented Sep 3, 2017

In python3.5, I've tried commonly used parsers like "html.parser" and 'lxml', but neither worked.
I mean when they are used, the command wordObj.findAll("w:t") always returns an empty list [], whereas 'xml' gives back what I expect, which is

[<w:t>A Word Document on a Website</w:t>, <w:t>This is a Word document, full of content that you want very much. Unfortunately, it’s difficult to access because I’m putting it on my website as a .</w:t>, <w:t>docx</w:t>, <w:t xml:space="preserve"> file, rather than just publishing it as HTML</w:t>].

Looking forward to your reply.
This is a great book, and let's make it even better!

I've tried commonly used parsers like "html.parser" and 'lxml', but neither worked. I mean when they are used, the command (wordObj.findAll("w:t")) always returns an empty list, whereas 'xml' gives back what I expect, which is
[<w:t>A Word Document on a Website</w:t>, <w:t>This is a Word document, full of content that you want very much. Unfortunately, it’s difficult to access because I’m putting it on my website as a .</w:t>, <w:t>docx</w:t>, <w:t xml:space="preserve"> file, rather than just publishing it as HTML</w:t>].
Looking forward to your reply. Thanks. 
This is a great book, and let's make it even better!
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant