views:

116

answers:

1

Hi i need to parse xml file which is more then 1 mb in size, i know GAE can handle request and response up to 10 MB but as we need to use SAX parser API and API GAE has limit of 1 MB so is there way we can parse file more then 1 mb any ways.

+2  A: 

The 1MB limit doesn't apply to parsing; however, you can't fetch more than 1MB from URLfetch; you'll only get the first 1MB from the API.

It's probably not going to be possible to get the XML into your application using the URLfetch API. If the data is smaller than 10MB, you can arrange for an external process to POST it to your application and then process it. If it's between 10MB and 2GB, you'd need to use the Blobstore API to upload it, read it in to your application in 1MB chunks, and process the concatenation of those chunks.

Wooble
The Blobstore reader API provides a file-like object for reading blobs, so there's no need to deal with 'chunks' of the file explicitly.
Nick Johnson