18 lines
620 B
Python
18 lines
620 B
Python
import docx
|
|
|
|
path = "PERANCANGAN SISTEM REKOMENDASI KAMERA PADA PERSEWAAN KAMERA DENGAN BERBASIS WEBSITE MENGUNAKAN ALGORITMA TOPSIS (Revisi 6 fix bismillah).docx"
|
|
doc = docx.Document(path)
|
|
|
|
para = doc.paragraphs[624]
|
|
math_para = para._p.find('{http://schemas.openxmlformats.org/officeDocument/2006/math}oMathPara')
|
|
|
|
if math_para is not None:
|
|
# Walk the tree and print elements with text
|
|
for elem in math_para.iter():
|
|
if elem.text:
|
|
# print tag and text
|
|
tag_local = elem.tag.split('}')[-1]
|
|
print(f"[{tag_local}] : '{elem.text}'")
|
|
else:
|
|
print("No oMathPara found.")
|