Hello,
How can I parse my XML file below?
xmllint --xpath '//feature[@name="Sophos"]' status
<feature name="Sophos" time_remaining="50920647"
I just want to get the numbers "50920647" how can I do that
The way it should be
External Threat Feeds 50920647
Sophos 50920647
Bounce Verification 49624647
ironPort Anti-Spam 50920647
---------------------------------------------------------------------------------------------------------------------------------------------
<?xml version="1.0" encoding="ISO-8859-1" standalone="yes"?>
<status build="phoebe 13.0.0-375" hostname="erg.abcd.local" timestamp="20200909182231">
<birth_time timestamp="20200428211755 (133d 21h 4m 36s)"/>
<last_counter_reset timestamp=""/>
<system status="online" />
<oldest_message secs="254534" mid="21123212" />
<features>
<feature name="External Threat Feeds" time_remaining="50920647" />
<feature name="Sophos" time_remaining="50920647" />
<feature name="Bounce Verification" time_remaining="49624647" />
<feature name="IronPort Anti-Spam" time_remaining="50920647" />
<feature name="Incoming Mail Handling" time_remaining="50986939" />
<feature name="Outbreak Filters" time_remaining="50920647" />
</features>
<counters>
<counter name="inj_msgs"
reset="20661684"
uptime="5657544"
lifetime="20661684" />
<counter name="inj_recips"
reset="23360625"
uptime="6410997"
lifetime="23360625" />
---------------------------------------------------------------------------------------------------------------------------------------------
How can I parse my XML file below?
xmllint --xpath '//feature[@name="Sophos"]' status
<feature name="Sophos" time_remaining="50920647"
I just want to get the numbers "50920647" how can I do that
The way it should be
External Threat Feeds 50920647
Sophos 50920647
Bounce Verification 49624647
ironPort Anti-Spam 50920647
---------------------------------------------------------------------------------------------------------------------------------------------
<?xml version="1.0" encoding="ISO-8859-1" standalone="yes"?>
<status build="phoebe 13.0.0-375" hostname="erg.abcd.local" timestamp="20200909182231">
<birth_time timestamp="20200428211755 (133d 21h 4m 36s)"/>
<last_counter_reset timestamp=""/>
<system status="online" />
<oldest_message secs="254534" mid="21123212" />
<features>
<feature name="External Threat Feeds" time_remaining="50920647" />
<feature name="Sophos" time_remaining="50920647" />
<feature name="Bounce Verification" time_remaining="49624647" />
<feature name="IronPort Anti-Spam" time_remaining="50920647" />
<feature name="Incoming Mail Handling" time_remaining="50986939" />
<feature name="Outbreak Filters" time_remaining="50920647" />
</features>
<counters>
<counter name="inj_msgs"
reset="20661684"
uptime="5657544"
lifetime="20661684" />
<counter name="inj_recips"
reset="23360625"
uptime="6410997"
lifetime="23360625" />
---------------------------------------------------------------------------------------------------------------------------------------------
Comment