Dec-15-2018, 01:18 PM
BeautifulSoup works fine for attached example, bt unfortunately not on a big XML with different grouped XML-Tags for Name, Age and Number which are the relevant text values. Is this somehow possible for the following example to read Name, Age and Number and write it to a new file?
<data>
<friends>
<human>
<Name>Tim</Name>
<Age>23</Age>
<Number>1234</Number>
</human>
<human>
<Name>Jenny</Name>
<Age>23</Age>
<Number>4321</Number>
</human>
<animal>
<Name>Wuff</Name>
<Age>4</Age>
<Number>2323</Number>
</animal>
</friends>
</data>
Thanks a lot.
<data>
<friends>
<human>
<Name>Tim</Name>
<Age>23</Age>
<Number>1234</Number>
</human>
<human>
<Name>Jenny</Name>
<Age>23</Age>
<Number>4321</Number>
</human>
<animal>
<Name>Wuff</Name>
<Age>4</Age>
<Number>2323</Number>
</animal>
</friends>
</data>
Thanks a lot.