Interstage Shunsaku Data Manager Application Development Guide - Microsoft(R) Windows(R) 2000/ Microsoft(R) Windows Server(TM) 2003 - - UNIX -
Contents Index PreviousNext

Appendix E Notes on XML Documents

E.2 XML Document in Text Files

Multiple XML documents can be imported directly from text files into Shunsaku. This can be done in a single operation if all XML documents are stored sequentially in a single file.Shunsaku stores multiple XML documents that are stored in a single file by separating each document.

Example 1

Importing multiple XML documents (that include comments in between the end tag of one document and the start tag for the root element of the next document) into Shunsaku by placing them in a single file
Document A
<!-- Starting A -->
<A>
    <B>aaam</B>
</A>
<!-- End A -->

Document B
<!-- Starting B -->
<A>
    <C>bbbm</C>
</A>
<!-- End B -->
If the above two documents are stored as a single file and then imported, the end tag for the root element "</A>" will be treated as the end of document A. Therefore, when document B as a whole is retrieved, it contains the text "<!-- End A -->" from document A.
Retrieved Document A
<!-- Starting A -->
<A>
    <B>aaam</B>
</A>
Retrieved Document B
<!-- End A -->
<!-- Starting B -->
<A>
    <C>bbbm</C>
</A>

Example 2

Importing multiple XML documents (that include any text between the end tag of one document and the start tag for the root element of the next document) into Shunsaku by placing them in a single file
Document A
Document A Start
<A>
    <B>aaam</B>
</A>
Document A End
Document B
Document B Start
<A>
    <C>bbbm</C>
</A>
Document B End
If these two documents are stored in a single file and then imported, both document A and document B will be judged as being the content in between their respective <A> and </A> tags, and all other text will be ignored.
Accordingly, if document A and document B are retrieved, the content in between their respective <A> and </A> tags will be returned as documents.
Retrieved Document A
<A>
    <B>aaam</B>
</A>
Retrieved Document B
<A>
    <C>bbbm</C>
</A>

Contents Index PreviousNext

All Rights Reserved, Copyright(C) FUJITSU LIMITED 2006