I'm trying to parse a list of cases that is returned from the Fogbugz API.
Current code:
from fogbugz import FogBugz
from datetime import datetime, timedelta
import fbSettings
fb = FogBugz(fbSettings.URL, fbSettings.TOKEN)
resp = fb.search(q='project:"Python Testing"',cols='ixBug')
print resp.cases.case.ixbug.string
The problem is that the XML has multiple cases returned simply as case. For instance my test search back the following:
<response>
<cases count="3">
<case ixbug="133529" operations="edit,assign,resolve,email,remind">
<ixbug>
133529
</ixbug>
</case>
<case ixbug="133528" operations="edit,assign,resolve,email,remind">
<ixbug>
133528
</ixbug>
</case>
<case ixbug="133527" operations="edit,assign,resolve,email,remind">
<ixbug>
133527
</ixbug>
</case>
</cases>
</response>
But
print resp.cases.case.ixbug.string
only returns the first case number in the XML, ignoring the other two. How can I modify my print statement to return all three case numbers?
From the docs: