Transform original tree using stylesheet. This method will transform original xml using XSLT script into am ideally flatter xml document for easier parsing and migration to Data Frame.
(self)
| 659 | return document |
| 660 | |
| 661 | def _transform_doc(self) -> etree._XSLTResultTree: |
| 662 | """ |
| 663 | Transform original tree using stylesheet. |
| 664 | |
| 665 | This method will transform original xml using XSLT script into |
| 666 | am ideally flatter xml document for easier parsing and migration |
| 667 | to Data Frame. |
| 668 | """ |
| 669 | from lxml.etree import XSLT |
| 670 | |
| 671 | transformer = XSLT(self.xsl_doc) |
| 672 | new_doc = transformer(self.xml_doc) |
| 673 | |
| 674 | return new_doc |
| 675 | |
| 676 | |
| 677 | def get_data_from_filepath( |