Division program, combination program and information processing method
First Claim
1. An apparatus for dividing information contained in a first structured document into a plurality of second structured documents, comprising:
- a storage device to store the first structured document and the plurality of second structured documents; and
a central processing unit connected to the storage device via a bus, wherein the central processing unit is configured to;
obtain a content of the first structured document sequentially line by line beginning from the head;
when the obtained content includes a start tag and there is no record between the start tag and an end tag corresponding to the start tag, store a tag name of the start tag by pushdown into a stack and copy a tag name of the start tag of the obtained content into a first output file different from the first structured document;
when the obtained content includes a start tag and there is a record between the start tag and the end tag corresponding to the start tag, copy an element relating to the record at an end of the first output file;
add an identifier end tag indicating a position corresponding to a record count value to determine a dividing position in accordance with a number of the record as the dividing position, generate an additional end tag corresponding to the start tag of the first output file by using the start tag stored in the stack, and add the additional end tag after the identifier end tag of the first output file;
after generating the first output file, generate an additional start tag corresponding to the additional end tag in the first output file by using the start tag stored in the stack, and add an identifier start tag corresponding to the identifier end tag of the first output file;
when the content obtained from the first structured document includes the element relating to the record, copy the content indicating the element relating to the record to the second output file;
when the content obtained from the first structured document includes an end tag, popup a name of a tag of the first tag stored in the stack, and copy the obtained end tag at an end of the second output file; and
when a root tag of the first structured document matches the end tag, terminate dividing processing, and generate the plurality of second structured documents.
1 Assignment
0 Petitions
Accused Products
Abstract
The present invention provides an information processing method converting a format of a structured document, comprising: a first step copying, a first storage unit, information of a pre-converted first structured document sequentially by a predetermined amount beginning from the head; a second step adding start tags and/or end tags, and an identifier tag for identifying the aforementioned start and/or end tags so that the information copied to the first storage unit becomes one complete second structured document; a third step converting the second structured document built up in the first storage unit to a target format and outputting it to a second storage as a third structured document; and a fourth step removing the start tags and/or end tags and the identifier tag added to in the second step from the third structured document retained by the second storage unit and merging with a fourth structured document.
-
Citations
7 Claims
-
1. An apparatus for dividing information contained in a first structured document into a plurality of second structured documents, comprising:
-
a storage device to store the first structured document and the plurality of second structured documents; and a central processing unit connected to the storage device via a bus, wherein the central processing unit is configured to; obtain a content of the first structured document sequentially line by line beginning from the head; when the obtained content includes a start tag and there is no record between the start tag and an end tag corresponding to the start tag, store a tag name of the start tag by pushdown into a stack and copy a tag name of the start tag of the obtained content into a first output file different from the first structured document; when the obtained content includes a start tag and there is a record between the start tag and the end tag corresponding to the start tag, copy an element relating to the record at an end of the first output file; add an identifier end tag indicating a position corresponding to a record count value to determine a dividing position in accordance with a number of the record as the dividing position, generate an additional end tag corresponding to the start tag of the first output file by using the start tag stored in the stack, and add the additional end tag after the identifier end tag of the first output file; after generating the first output file, generate an additional start tag corresponding to the additional end tag in the first output file by using the start tag stored in the stack, and add an identifier start tag corresponding to the identifier end tag of the first output file; when the content obtained from the first structured document includes the element relating to the record, copy the content indicating the element relating to the record to the second output file; when the content obtained from the first structured document includes an end tag, popup a name of a tag of the first tag stored in the stack, and copy the obtained end tag at an end of the second output file; and when a root tag of the first structured document matches the end tag, terminate dividing processing, and generate the plurality of second structured documents. - View Dependent Claims (2, 5)
-
-
3. A method for dividing information contained in a first structured document into a plurality of second structured documents, comprising:
-
obtaining a content of the first structured document sequentially line by line beginning from the head using a computer; when the obtained content includes a start tag and there is no record between the start tag and an end tag corresponding to the start tag, storing a tag name of the start tag by pushdown into a stack and copying a tag name of the start tag of the obtained content into a first output file different from the first structured document; when the obtained content includes a start tag and there is a record between the start tag and the end tag corresponding to the start tag, copying an element relating to the record at an end of the first output file; adding an identifier end tag indicating a position corresponding to a record count value to determine a dividing position in accordance with a number of the record as the dividing position, generating an additional end tag corresponding to the start tag of the first output file by using the start tag stored in the stack, and adding the additional end tag after the identifier end tag of the first output file; after generating the first output file, generating an additional start tag corresponding to the additional end tag in the first output file by using the start tag stored in the stack, and adding an identifier start tag corresponding to the identifier end tag of the first output file; when the content obtained from the first structured document includes the element relating to the record, copying the content indicating the element relating to the record to the second output file; when the content obtained from the first structured document includes an end tag, popup a name of a tag of the first tag stored in the stack, and copying the obtained end tag at an end of the second output file; and when a root tag of the first structured document matches the end tag, terminate dividing processing, and generating the plurality of second structured documents. - View Dependent Claims (6)
-
-
4. A non-transitory computer readable medium storing a program for dividing information contained in a first structured document into a plurality of second structured documents, the program adapted to be executed to implement a method on a computer, the method comprising:
-
obtaining a content of the first structured document sequentially line by line beginning from the head; when the obtained content includes a start tag and there is no record between the start tag and an end tag corresponding to the start tag, storing a tag name of the start tag by pushdown into a stack and copying a tag name of the start tag of the obtained content into a first output file different from the first structured document; when the obtained content includes a start tag and there is a record between the start tag and the end tag corresponding to the start tag, copying an element relating to the record at an end of the first output file; adding an identifier end tag indicating a position corresponding to a record count value to determine a dividing position in accordance with a number of the record as the dividing position, generating an additional end tag corresponding to the start tag of the first output file by using the start tag stored in the stack, and adding the additional end tag after the identifier end tag of the first output file; after generating the first output file, generating an additional start tag corresponding to the additional end tag in the first output file by using the start tag stored in the stack, and adding an identifier start tag corresponding to the identifier end tag of the first output file; when the content obtained from the first structured document includes the element relating to the record, copying the content indicating the element relating to the record to the second output file; when the content obtained from the first structured document includes an end tag, popup a name of a tag of the first tag stored in the stack, and copying the obtained end tag at an end of the second output file; and when a root tag of the first structured document matches the end tag, terminate dividing processing, and generating the plurality of second structured documents. - View Dependent Claims (7)
-
Specification