Update 6 readDocx.py --- an xml parser missing#50
Open
ZhanpengZhang wants to merge 1 commit intoREMitchell:masterfrom
Open
Update 6 readDocx.py --- an xml parser missing#50ZhanpengZhang wants to merge 1 commit intoREMitchell:masterfrom
ZhanpengZhang wants to merge 1 commit intoREMitchell:masterfrom
Conversation
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!
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
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!