How can we make xml data as object using Python? | Sololearn: Learn to code for FREE!
New course! Every coder should learn Generative AI!
Try a free lesson
+ 1

How can we make xml data as object using Python?

I have large xml data and i want to read it through model (data structure). Like, .net give us functionality to paste as xml classes or paste as json classes. So is there any way to do this? Or i have make object manually

22nd Jan 2019, 3:20 PM
Ramandeep Singh
Ramandeep Singh - avatar
1 Answer
+ 3
from lxml import objectify main = objectify.fromstring(xml)
22nd Jan 2019, 3:28 PM
Hubert Dudek
Hubert Dudek - avatar