I am trying to convert a docx file to a xml file using the python library python-docx. Working with paragraphs
works so far, but i fail to work with runs
.
I´m new to this and clearly missing something.
Imagine this docx:
Generic title
A paragraph with bold and italic text.
I get:
<document>
<title>Generic title</title>
<p>A paragraph with bold and italic text.</p>
</document>
What i want:
<document>
<title>Generic title</title>
<p>A paragraph with <b>bold</b> and <i>italic</> text.</p>
</document>
Could someone provide help? Highly appreciated.
New contributor
ecklex is a new contributor to this site. Take care in asking for clarification, commenting, and answering.
Check out our Code of Conduct.