[SOLVED] store content of a tag in a string with elementtree in python3

Issue I’m using Python 3.7.2 and elementtree to copy the content of a tag in an XML file. This is my XML file: <?xml version="1.0" encoding="UTF-8"?> <Document xmlns="urn:iso:std:iso:20022:tech:xsd:pain.001.003.03"> <CstmrCdtTrfInitn> <GrpHdr> <MsgId>nBblsUR-uH..6jmGgZNHLQAAAXgXN1Lu</MsgId> <CreDtTm>2016-11-10T12:00:00.000+01:00</CreDtTm> <NbOfTxs>1</NbOfTxs> <CtrlSum>6</CtrlSum> <InitgPty> <Nm>TC 03000 Kunde 55 Protokollr

Continue reading

[SOLVED] Reading PASCAL VOC annotations in python

Issue I have annotations in xml files such as this one, which follows the PASCAL VOC convention: <annotation> <folder>training</folder> <filename>chanel1.jpg</filename> <source> <database>synthetic initialization</database> <annotation>PASCAL VOC2007</annotation> <image>synthetic</image> <flickrid>none</flickrid> </source> <owner> <flickrid>none</flickrid> <name>none</name> </owner> <size> <width>640</width> <height>427</height> <depth>3</depth> </size> <segmented>0</segmented> <object> <name>chanel</name>

Continue reading