Parse Jenkins API to list jenkins jobs

bomnet87

New Member
I am working on parsing the job names from jenkins REST API.\[code\] http://jenkins-host:8080/api/xml\[/code\]following is the format of xml API\[code\]<hudson><job> <name>Test_Job1</name> <url>http://jenkins-host:8080/job/Test_job1/</url> <color>red</color></job><job> <name>Test_job2</name> <url>http://jenkins-host:8080/job/Test_job2/</url> <color>red</color></job><view> <name>Test_View</name> <url>http://jenkins-host:8080/</url></view></hudson>\[/code\]Here I want to store Only the job names into an array not the view name.Ex:\[code\]@list = (Test_job1, Test_job2)\[/code\]Help for this much appreciated.Thanks in advance.
 
Back
Top