I am successfully retreving the odt xml file in python but I have no idea how to pull xml file data?
Any techniques are there for pulling the odt xml file data.
Here my code for extracting odt xml file
#!/usr/lib/python2.7
import sys, zipfile
if len(sys.argv) < 2:
print "input.odt & output.xml"
sys.exit(0)
content=""
myfile = zipfile.ZipFile(sys.argv[1])
listoffiles = myfile.infolist()
for s in listoffiles:
if s.orig_filename == 'content.xml':
fd = open(sys.argv[2],'w')
content = myfile.read(s.orig_filename)
fd.write(content)
fd.close()