12 years ago
Extract data out of Alertsite XML
Hi Guys,
I'm having a bit of a nightmare trying to figure out how to echo out part of an xml that alertsites API generates.
Basically I'm after the latest / last Timiings Total value. Any ideas on a way this can be extracted via VBS ?
<Measurement Timestamp="2013-09-10 16:58:25">
<Timings Total="0.0756" Connect="0.0051" Content="0.0004" Dns="0.0008" Firstbyte="0.0300" Redirect="0.0392"/>
<Capture_exists>0</Capture_exists>
<Ctl_devlog>5070-93183437</Ctl_devlog>
<Deja_branched>0</Deja_branched>
<Dejatime_afttime>0</Dejatime_afttime>
<Dejatime_domload>0</Dejatime_domload>
<Dejatime_firstpaint>0</Dejatime_firstpaint>
<Dejatime_pageload>0</Dejatime_pageload>
<HTTPStatus>HTTP/1.1 200 OK</HTTPStatus>
<Info_msg/>
<Notified/>
<ResponseLength>5487</ResponseLength>
<Status>0</Status>
<Status_verify>0</Status_verify>
<Status_warning>0</Status_warning>
<User_experience>0</User_experience>
</Measurement>
<Measurement Timestamp="2013-09-10 16:59:23">
<Timings Total="0.0828" Connect="0.0052" Content="0.0004" Dns="0.0008" Firstbyte="0.0421" Redirect="0.0342"/>
<Capture_exists>0</Capture_exists>
<Ctl_devlog>5070-93183517</Ctl_devlog>
<Deja_branched>0</Deja_branched>
<Dejatime_afttime>0</Dejatime_afttime>
<Dejatime_domload>0</Dejatime_domload>
<Dejatime_firstpaint>0</Dejatime_firstpaint>
<Dejatime_pageload>0</Dejatime_pageload>
<HTTPStatus>HTTP/1.1 200 OK</HTTPStatus>
<Info_msg/>
<Notified/>
<ResponseLength>5487</ResponseLength>
<Status>0</Status>
<Status_verify>0</Status_verify>
<Status_warning>0</Status_warning>
<User_experience>0</User_experience>
</Measurement>
I'm having a bit of a nightmare trying to figure out how to echo out part of an xml that alertsites API generates.
Basically I'm after the latest / last Timiings Total value. Any ideas on a way this can be extracted via VBS ?
<Measurement Timestamp="2013-09-10 16:58:25">
<Timings Total="0.0756" Connect="0.0051" Content="0.0004" Dns="0.0008" Firstbyte="0.0300" Redirect="0.0392"/>
<Capture_exists>0</Capture_exists>
<Ctl_devlog>5070-93183437</Ctl_devlog>
<Deja_branched>0</Deja_branched>
<Dejatime_afttime>0</Dejatime_afttime>
<Dejatime_domload>0</Dejatime_domload>
<Dejatime_firstpaint>0</Dejatime_firstpaint>
<Dejatime_pageload>0</Dejatime_pageload>
<HTTPStatus>HTTP/1.1 200 OK</HTTPStatus>
<Info_msg/>
<Notified/>
<ResponseLength>5487</ResponseLength>
<Status>0</Status>
<Status_verify>0</Status_verify>
<Status_warning>0</Status_warning>
<User_experience>0</User_experience>
</Measurement>
<Measurement Timestamp="2013-09-10 16:59:23">
<Timings Total="0.0828" Connect="0.0052" Content="0.0004" Dns="0.0008" Firstbyte="0.0421" Redirect="0.0342"/>
<Capture_exists>0</Capture_exists>
<Ctl_devlog>5070-93183517</Ctl_devlog>
<Deja_branched>0</Deja_branched>
<Dejatime_afttime>0</Dejatime_afttime>
<Dejatime_domload>0</Dejatime_domload>
<Dejatime_firstpaint>0</Dejatime_firstpaint>
<Dejatime_pageload>0</Dejatime_pageload>
<HTTPStatus>HTTP/1.1 200 OK</HTTPStatus>
<Info_msg/>
<Notified/>
<ResponseLength>5487</ResponseLength>
<Status>0</Status>
<Status_verify>0</Status_verify>
<Status_warning>0</Status_warning>
<User_experience>0</User_experience>
</Measurement>