1. A method, comprising: reading into a buffer a portion of an XML document; before reading into said buffer the entire XML document: reading a certain portion of said XML document; based on said certain portion of said XML document, determining that said XML document should be stored within a certain partition of a database table; in response to determining that said XML document should be stored within a certain partition of a database table: storing a portion of the XML document stored in the buffer in the partition; and reading and storing a remainder of the XML document in the partition.