The NextBus agency list

NextBus customers are called agencies. In our examples, we will track buses on a route for Los Angeles, California. First, we need to get some information about the agency. The NextBus API consists of a web service named publicXMLFeed in which you set a parameter named command. We'll call the agencyList command in a browser to get an XML document containing the agency information using the following REST URL: http://webservices.nextbus.com/service/publicXMLFeed?command=agencyList.

When we go to this link in a browser, it returns an XML document containing the <agency/> tag. The tag for Los Angeles looks as follows:

<agency tag="lametro" title="Los Angeles Metro" regionTitle="California-Southern"/>
..................Content has been hidden....................

You can't read the all page of ebook, please click here login for view all page.
Reset