Patent ID: 7451396

Claim:
A computer implemented method for synchronizing the contents of a line-oriented document and a corresponding stream-oriented document, the computer implemented method comprising: loading a line-oriented document and a corresponding stream-oriented document in a memory of a data processing system, wherein the corresponding stream-oriented document is associated with a stream-oriented document event listener API, wherein the line-oriented document is associated with a line-oriented document event listener API, and wherein the line-oriented document comprises records having a text element area and a corresponding sequence number area comprising a line delimiter to indicate an end of a record; detecting, by the line-oriented document event listener API, a line-oriented document change event, wherein the line-oriented document change event occurs in response to a change in the line-oriented document; detecting, by the stream-oriented document event listener API, a stream-oriented document change event, wherein the stream-oriented document change event occurs in response to a change in the stream-oriented document; responsive to detecting the line-oriented document change event, translating line-oriented event text coordinates into stream-oriented text coordinates and determining a complementary document change that is required to update the corresponding stream-oriented document; implementing the complementary document change in the corresponding stream-oriented document; responsive to detecting the stream-oriented document change event, translating the stream-oriented event text coordinates into the line-oriented text coordinates and determining the complementary document change that is required to update the line-oriented document; and implementing the complementary document change in the line-oriented document.