Nice! Its one more récipe to be included somewhere in the book.
Enviado via iPhone Em 19/11/2010, às 20:57, mdipierro <[email protected]> escreveu: > a=""" > <response> > <Status>OK</ > Status> > <Time> > <ID>123456</ > ID> > <Job> > <ID>J000001</ > ID> > <Name>Brochure Template</ > Name> > </ > Job> > <Task> > <ID>412</ > ID> > <Name>Design & Layout</ > Name> > </ > Task> > <Staff> > <ID>1</ > ID> > <Name>Chris Spence </ > Name> > </ > Staff> > <Date>2008-10-29T00:00:00</ > Date> > <Minutes>240</ > Minutes> > <Note / >> > <Billable>true</ > Billable> > <!-- below values are included if the time entry was record with a > start end time --> > <Start>13:00</ > Start> > <End>17:00</ > End> > </ > Time> > </ > Response> > """ > > html=TAG(a) > print html.element('status')[0] > print html.element('task id')[0] > > > > On Nov 19, 4:31 pm, Steve Shepherd <[email protected]> wrote: >> Hi Folks >> >> Can someone post a code example or somewhere I can look for examples on : >> >> 1. Reading an XML stream that is returned from an API call. >> For example:http://api.workflowmax.com/time.api/get/123456?apiKey=[your API >> key]&accountKey=[WorkflowMax account key] >> >> This returns a xml string like this: >> >> Example Response: >> 01.<Response> >> 02.<Status>OK</Status> >> 03.<Time> >> 04.<ID>123456</ID> >> 05.<Job> >> 06.<ID>J000001</ID> >> 07.<Name>Brochure Template</Name> >> 08.</Job> >> 09.<Task> >> 10.<ID>412</ID> >> 11.<Name>Design & Layout</Name> >> 12.</Task> >> 13.<Staff> >> 14.<ID>1</ID> >> 15.<Name>Chris Spence </Name> >> 16.</Staff> >> 17.<Date>2008-10-29T00:00:00</Date> >> 18.<Minutes>240</Minutes> >> 19.<Note /> >> 20.<Billable>true</Billable> >> 21.<!-- below values are included if the time entry was record with a start >> and end time --> >> 22.<Start>13:00</Start> >> 23.<End>17:00</End> >> 24.</Time> >> 25.</Response> >> >> How can I read this into Web2py and display it or add it to my own tables.

