I'm trying to get the status of a policy using the API and a script. I can't seem to extract the text I am looking for. I'm using curl to read the XML
curl -v -k -u API_username:API_password https://jss.example.com:8443/JSSResource/policies/id/17
It comes in a long single-line string that I've placed some below. From that string I'm hoping to read what's between <enabled> </enabled>. I can't seem to figure it out.
<?xml version="1.0" encoding="UTF-8" standalone="no"?><policy><general><id>181</id><name>ZombieComputers</name><enabled>false</enabled><trigger>every15</trigger><trigger_other/><frequency>Disabled</frequency><offline>false</offline><category><id>20</id><name>NetRender</name></category><date_time_limitations><activation_date>2011-08-30 16:00:00</activation_date> ....and it goes on from here....
Anyone?
Thanks!!!