skip to Main Content

Json – To print the data after replacing the given expression with the values in XML file using "ElementTree" library

Given XML file snippet is: <?xml version="1.0" standalone="yes"?> <event_configuration family="21" version="2"> <pqr subtype="abc"> <event val="73002" name="$MyCpu"> </event> <event val="73003" name="$MyCpuKernel"> </event> <metric name="Ratio" expression="$MyCpuKernel / $MyCpu"> </metric> </pqr> </event_configuration> I have parsed this xml file using "ElementTree" library in Python,…

VIEW QUESTION

Can Python parse XML within HTML?

I have an HTML file which contains XML at the bottom of it and enclosed by comments, it looks like this: <!DOCTYPE html> <html> <head> *** </head> <body> <div class="panel panel-primary call__report-modal-panel"> <div class="panel-heading text-center custom-panel-heading"> <h2>Report</h2> </div> <div class="panel-body">…

VIEW QUESTION
Back To Top
Search