Altova Mailing List Archives>Archive Index >microsoft.public.xsl Archive Home >Recent entries [Thread Prev] >Thread Next - Re: How can I go about parsing this XML for the info I need? How can I go about parsing this XML for the info I need?To: NULL Date: 5/7/2009 8:42:00 AM Using code similar to the snippet I'm pasting below, I need to be able to loop through the XML and retrieve specific pieces of information such as the average counter_cpu_idle, the average counter_cpu_idle_states, etc. The file includes multiple entries along the line of <data xsi:type="ns2:perf_dataType">. Other information I needed from a different XML file was easy to navigate to with simple XPath statements, but this looked like it requires XSLT...and I'm not sure where to start. Any help would be greatly appreciated! <?xml version="1.0" encoding="UTF-8"?> <packet xmlns:ns1="http://www.swsoft.com/webservices/vzl/4.0.0/protocol" xmlns:ns2="http://www.swsoft.com/webservices/vzl/4.0.0/types" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" time="2009-05-05T17:56:17+0000" priority="0" version="4.0.0"> <ns1:origin>perf_mon</ns1:origin> <ns1:target>vzclient12-64881bf8-4953-4d5d-e80a-8e1e49b4a2ab</ns1:target> <ns1:dst> <director>gend</director> </ns1:dst> <ns1:data> <perf_mon> <data xsi:type="ns2:perf_dataType"> <ns2:eid>42b1462a-ed4b-40b9-b627-75b364719731</ns2:eid> <ns2:interval xsi:type="ns2:intervalType"> <ns2:start_time>2009-05-05T17:41:17+0000</ns2:start_time> <ns2:end_time>2009-05-05T17:56:17+0000</ns2:end_time> </ns2:interval> <ns2:class> <ns2:name>counters_vz_cpu</ns2:name> <ns2:instance> <ns2:name></ns2:name> <ns2:counter> <ns2:name>counter_cpu_idle</ns2:name> <ns2:value> <ns2:avg>36008546270</ns2:avg> <ns2:min>36008546270</ns2:min> <ns2:max>36008546270</ns2:max> <ns2:cur>36008546270</ns2:cur> </ns2:value> </ns2:counter> <ns2:counter> <ns2:name>counter_cpu_idle_states</ns2:name> <ns2:value> <ns2:avg>99</ns2:avg> <ns2:min>99</ns2:min> <ns2:max>100</ns2:max> <ns2:cur>100</ns2:cur> </ns2:value> </ns2:counter> <ns2:counter> <ns2:name>counter_cpu_limit</ns2:name> <ns2:value> <ns2:avg>100.000000</ns2:avg> <ns2:min>100.000000</ns2:min> <ns2:max>100.000000</ns2:max> <ns2:cur>100.000000</ns2:cur> </ns2:value> </ns2:counter> -- Things are more like they are now than they ever have been before. | ||||||
| Company | Legal | Press | Partners | Careers | Sitemap | Contact Us | Altova Blog | Mobile | Full Site | |||
|
