0

I have to send a large xml document from an android client to a server as a stream. I cannot use DOM parser due to memory constraints. I require something like a SAX parser, but SAX can only parse the data. Is there any library for this?

Thanks in advance.

Edit: I generate the xml data on the fly. I do not read from a file.

1 Answers1

0

Just hand generate the XML. It is not too hard and certainly no harder than using a SAX parser to parse the XML.

doron
  • 27,972
  • 12
  • 65
  • 103
  • Yes, that is an option for me. I wanted to know if there is a standard library to do this. – GaussianMixturePerson Apr 28 '14 at 12:42
  • Well any general purpose library will have to have a full in-memory representation of the XML in order to generate the XML - namely a DOM tree - leading back to a DOM parser-generator. – doron Apr 28 '14 at 12:51