Комментарии:
Thanks a lot for the great tutorial. Your approach to XML parsing was spot-on for me and it was exactly what I was looking for to get started on XML parsing.
Ответитьshitty video, sorry
ОтветитьExcellent man!
This is what I was looking for :)
That's how it is supposed to be taught. I have been browsing the courses on how to do it and they all are complicated. Thankfully found this video. Thanks a lot. Great job!
ОтветитьIs there a way to change sub-element instead of the whole element string? let's say for example that I want to change W with SW but not the name, and I need to do it in a loop so I can't put the name string inside as it changes anytime, is there a way to call the specific sub element?
Ответитьcan you mass edit multiple files?
ОтветитьThanks a lot for this video. I couldn't grasp the concepts properly even after reading from books. This video made it look like piece of cake.
Ответитьhii franseco great video thanks i need small suggestion here let's saya <KTOPL> 100</KTOPL> so in this i need output like KTOPL 100 here i need tag and value both how we can get can u please explian
ОтветитьGreat video. Thanks
ОтветитьThanks for this video, I needed to parse xml from a variable instead of a file and found this : xml_data_tree = ET.fromstring(received_packet)
ОтветитьHi Francesco,
i'm getting error while parsing xml file since it is having special words. kindly hep me to avoid this error.
Error : xml.etree.ElementTree.ParseError: not well-formed (invalid token): line 277, column 366
thank you for this
Ответитьthanks a lot
ОтветитьMerge XML files using python,can you please make video on this top
ОтветитьIncrease your font size before doing tutorials. its quite complicated to read texts. anyway goodjob
ОтветитьHi Francesco, Thanks for sharing your knowledge with us. I have a doubt if we want to get a element based on the value of other element , how can we do. I want if attachment is local, print symid. Can you or someone else here please help me here.
<?xml version="1.0" standalone="yes" ?>
<SymCLI_ML>
<Box>
<Symm_Info>
<symid>000120000369</symid>
<attachment>Local</attachment>
<model>model1</model>
<microcode_version>6079</microcode_version>
<cache_megabytes>250880</cache_megabytes>
<cache_gigabytes>245.0</cache_gigabytes>
<devices>8532</devices>
<physical_devices>502</physical_devices>
</Symm_Info>
</Box>
<Box>
<Symm_Info>
<symid>000120000566</symid>
<attachment>Local</attachment>
<model>model2</model>
<microcode_version>6079</microcode_version>
<cache_megabytes>520192</cache_megabytes>
<cache_gigabytes>508.0</cache_gigabytes>
<devices>10391</devices>
<physical_devices>512</physical_devices>
</Symm_Info>
</Box>
<Box>
<Symm_Info>
<symid>000120000568</symid>
<attachment>Local</attachment>
<model>model3</model>
<microcode_version>6079</microcode_version>
<cache_megabytes>165888</cache_megabytes>
<cache_gigabytes>162.0</cache_gigabytes>
<devices>19444</devices>
<physical_devices>880</physical_devices>
</Symm_Info>
</Box>
</SymCLI_ML>
Go raibh céad maith agat, a Francesco. Rud a bhí de dhíth orm le fada. Pádraig Mac Con Uladh
Ответитьlooking forword...
Ответитьthanks a lot ❤
ОтветитьCan this be done by Beautifulsoup library?
ОтветитьHi Francesco. Thanks for the great video! I ran into an error after editing my xml file. I tried to view the entire file to make sure my changes were made with ET.dump(tree) and I always get "AttributeError: 'str' object has no attribute 'items'" I'm testing with Jupyter notebook and when I restart the kernel, ET.dump works just fine before I make changes to the file. Any idea on how to fix this? I'm new to Python.
ОтветитьGrazie Mille!!! That was exactly what I was looking for and all well explained!!!
ОтветитьHi Francesco! I have been trying to do something with elementtree for several days but it is impossible for me ... And it gives me the feeling that it is very simple. I want to make a little script that adds a child element only if it doesn't already have it. Imagine that the document lacks year to panama. My script would go through the xml document and add only the year to Panama ... Could you give me some idea please?
Many thanks.
How to install xmltree in python 2.7.5
I am not able to upgrade due to restriction