Open mastier opened 9 years ago
Hmm, looks like that should work. The <w:lastRenderedPageBreak/>
tag won't show up in every document, so you need to keep that in mind. The result you're getting is what you'd expect for a document without any of those tags.
Does it work with the expression '//w:p'?
Yeah I know i want to parse specific one :-) Actually my aim is to retrieve
This of course works:
In [25]: d.element.xpath('//w:p')
Out[25]:
[<CT_P '<w:p>' at 0x7fac4451faf8>,
<CT_P '<w:p>' at 0x7fac4451fb50>,
<CT_P '<w:p>' at 0x7fac4451fc58>,
<CT_P '<w:p>' at 0x7fac4451fcb0>,
<CT_P '<w:p>' at 0x7fac4451fd08>,
<CT_P '<w:p>' at 0x7fac4451fd60>,
<CT_P '<w:p>' at 0x7fac4451fdb8>,
<CT_P '<w:p>' at 0x7fac4451fe10>,
<CT_P '<w:p>' at 0x7fac4451fe68>,
<CT_P '<w:p>' at 0x7fac4451fec0>,
<CT_P '<w:p>' at 0x7fac4451ff18>,
<CT_P '<w:p>' at 0x7fac4451ff70>,
<CT_P '<w:p>' at 0x7fac4451ffc8>,
<CT_P '<w:p>' at 0x7fac44463050>,
<CT_P '<w:p>' at 0x7fac444630a8>,
<CT_P '<w:p>' at 0x7fac44463100>,
<CT_P '<w:p>' at 0x7fac44463158>,
<CT_P '<w:p>' at 0x7fac444631b0>,
<CT_P '<w:p>' at 0x7fac44463208>,
<CT_P '<w:p>' at 0x7fac44463260>,
<CT_P '<w:p>' at 0x7fac444632b8>,
...
I want to use xpath to search for element taken from document. Is the tag " " broken ? Should it be just " " ? ( with space before "/>" , so in result Micro$oft fault :grin: )
Because I cannot look it up it with xpath()
Here is the excerpt from word/document.xml