Patent ID: 7853676

Claim:
A machine-implemented method, comprising: a network device receiving, from a client, a request that requires creating XML response data by adding XML text to an XML document, wherein the XML document, including all of its parts is an entire XML document; in response to the request, the network device generating a first chunk of the XML document, wherein the first chunk is not the entire XML document; the network device determining whether a size of the first chunk of the XML document exceeds a configurable threshold size; in response to determining that the size of the first chunk of the XML document has reached the configurable threshold size, the network device ceasing to add further XML text to the first chunk of the XML document; saving state information, wherein the state information includes a point at which generation of the XML document stopped; the network device transmitting only the first chunk of the entire XML document to the client, wherein the first chunk includes an identifier tag that indicates that the entire XML document has not been transmitted to the client and a document number that uniquely identifies a second chunk of the entire XML document that has not been generated; wherein the identifier tag included in the first chunk identifies the entire XML document, and does not identify only a chunk that is less than the entire XML document; and receiving from the client a request for the second chunk of the entire XML document; in response to receiving a request for the second portion of the entire XML document, adding XML text to the second portion of the entire XML document at the point at which document generation stopped; wherein the request for the second portion includes the document number; in response to receiving a subsequent request from the client, determining if a size of a remaining chunk exceeds the configurable threshold size, wherein the remaining chunk is the portion of the entire XML document that has not been generated and transmitted to the client; in response to determining that the size of the remaining chunk does exceed the configurable threshold size, generating and transmitting only a next chunk of the entire XML document to the client, wherein the next chunk is a next sequential portion of the entire XML document, wherein the entire XML document has not yet been generated and transmitted and the next chunk includes the identifier tag; and in response to determining that the size of the remaining chunk does not exceed the configurable threshold size, generating and transmitting the remaining chunk of the entire XML document to the client, wherein the remaining chunk is a last portion in sequence of the entire XML document and the remaining chunk does not include the identifier tag.