File tree Expand file tree Collapse file tree 3 files changed +4
-4
lines changed Expand file tree Collapse file tree 3 files changed +4
-4
lines changed Original file line number Diff line number Diff line change 16
16
17
17
# configure XML parser
18
18
element_class_lookup = etree .ElementNamespaceClassLookup ()
19
- oxml_parser = etree .XMLParser (remove_blank_text = True )
19
+ oxml_parser = etree .XMLParser (remove_blank_text = True , resolve_entities = False )
20
20
oxml_parser .set_element_class_lookup (element_class_lookup )
21
21
22
22
nsmap = {
Original file line number Diff line number Diff line change 14
14
15
15
# configure XML parser
16
16
element_class_lookup = etree .ElementNamespaceClassLookup ()
17
- oxml_parser = etree .XMLParser (remove_blank_text = True )
17
+ oxml_parser = etree .XMLParser (remove_blank_text = True , resolve_entities = False )
18
18
oxml_parser .set_element_class_lookup (element_class_lookup )
19
19
20
20
Original file line number Diff line number Diff line change @@ -651,7 +651,7 @@ def _tbl(self):
651
651
"""
652
652
The tbl element this tc element appears in.
653
653
"""
654
- return self .xpath ('./ancestor::w:tbl' )[0 ]
654
+ return self .xpath ('./ancestor::w:tbl[position()=1] ' )[0 ]
655
655
656
656
@property
657
657
def _tc_above (self ):
@@ -675,7 +675,7 @@ def _tr(self):
675
675
"""
676
676
The tr element this tc element appears in.
677
677
"""
678
- return self .xpath ('./ancestor::w:tr' )[0 ]
678
+ return self .xpath ('./ancestor::w:tr[position()=1] ' )[0 ]
679
679
680
680
@property
681
681
def _tr_above (self ):
You can’t perform that action at this time.
0 commit comments