JP2002207721A - Means for converting two-dimensional data for hierarchical structure data - Google Patents

Means for converting two-dimensional data for hierarchical structure data

Info

Publication number
JP2002207721A
JP2002207721A JP2001004173A JP2001004173A JP2002207721A JP 2002207721 A JP2002207721 A JP 2002207721A JP 2001004173 A JP2001004173 A JP 2001004173A JP 2001004173 A JP2001004173 A JP 2001004173A JP 2002207721 A JP2002207721 A JP 2002207721A
Authority
JP
Japan
Prior art keywords
data
hierarchical structure
dimensional data
line
name
Prior art date
Legal status (The legal status is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the status listed.)
Pending
Application number
JP2001004173A
Other languages
Japanese (ja)
Inventor
Yasuoki Tanaka
康興 田中
Current Assignee (The listed assignees may be inaccurate. Google has not performed a legal analysis and makes no representation or warranty as to the accuracy of the list.)
Axis Software Co Ltd
Original Assignee
Axis Software Co Ltd
Priority date (The priority date is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the date listed.)
Filing date
Publication date
Application filed by Axis Software Co Ltd filed Critical Axis Software Co Ltd
Priority to JP2001004173A priority Critical patent/JP2002207721A/en
Publication of JP2002207721A publication Critical patent/JP2002207721A/en
Pending legal-status Critical Current

Links

Landscapes

  • Document Processing Apparatus (AREA)
  • Information Retrieval, Db Structures And Fs Structures Therefor (AREA)

Abstract

PROBLEM TO BE SOLVED: To easily convert a hierarchical structure data such as an XML document having repeated elements to the each of which a name is added into a two-dimensional data without using a styles sheet language such as a CSS, an XSL, an XSLT difficult in a conversion rule, so as to be displayed on an image plane or printed out as a table comprising a line and a column, to allow inexpensive introduction thereby without securing a skilled technician, and to make a conversion speed high. SOLUTION: In this conversion means for converting the hierarchical structure data such as the XML document having the repeated elements to the each of which the name is added into the two-dimensional data, a hierarchical structure is traced in order to investigate the element name, the element before a portion where the element of the same name appears again in the present line is made the line, the individual element is brought into the column, and a foregoing line is copied for a deficient column.

Description

【発明の詳細な説明】DETAILED DESCRIPTION OF THE INVENTION

【0001】[0001]

【発明の属する技術分野】本発明は、繰り返しの要素を
もち、要素に名前が付されたXML文書のごとき階層構
造データを行・列の二次元データへ容易に変換できる、
階層構造データの二次元データ変換手段に関する。
BACKGROUND OF THE INVENTION 1. Field of the Invention The present invention can easily convert hierarchical data such as an XML document having repeating elements into two-dimensional data of rows and columns.
The present invention relates to two-dimensional data conversion means for hierarchically structured data.

【0002】[0002]

【従来の技術】XML文書は構造データを記述したもの
であるから、レイアウト情報がなく、そのため、XML
文書をレイアウトした状態で表示させるために、CS
S、XSL、XSLTなどのスタイルシート言語が用意
されている。しかしながら、例えば、上記XML文書を
二次元データへ変換し、例えば行・列の表としてプリン
トアウトするために、上記したCSS、XSL、XSL
Tなどのスタイルシート言語を使用すると、変換ルール
が難解であるため、高いスキルが必要とされ、熟練技術
者の確保、高い処理コスト、長時間の作業などを負担せ
ざるを得なかったものである。
2. Description of the Related Art Since an XML document describes structural data, there is no layout information.
In order to display the document in a laid out state, CS
Style sheet languages such as S, XSL, and XSLT are provided. However, for example, in order to convert the XML document into two-dimensional data and print it out as a table of rows and columns, for example, the CSS, XSL, XSL
If a style sheet language such as T is used, since the conversion rules are difficult, a high level of skill is required, and there is no choice but to secure skilled technicians, high processing costs, and long hours of work. is there.

【0003】[0003]

【発明が解決しようとする課題】本発明は、上記した実
状に鑑みてなされたもので、繰り返しの要素をもち、要
素に名前が付されたXML文書のごとき階層構造データ
を、変換ルールが難解なCSS、XSL、XSLTなど
のスタイルシート言語を使用することなく、二次元デー
タへ簡単に変換して、例えば行・列の表としてプリント
アウトでき、したがって、熟練技術者を確保するなどの
面倒もなく、低コストで導入でき、変換速度も早い、階
層構造データの二次元データ変換手段を提供することを
その目的とするものである。
SUMMARY OF THE INVENTION The present invention has been made in view of the above situation, and has a structure in which hierarchical structure data such as an XML document having repetitive elements and having names given to the elements is difficult to convert. Can be easily converted to two-dimensional data without using a style sheet language such as CSS, XSL, XSLT, etc., and printed out as a table of rows and columns, for example. It is an object of the present invention to provide a two-dimensional data conversion means for hierarchically structured data which can be introduced at low cost and has a high conversion speed.

【0004】[0004]

【問題を解決するための手段】上記の目的を達成するた
めに、本発明に係る階層構造データの二次元データ変換
手段は、繰り返しの要素をもち、要素に名前が付された
XML文書のごとき階層構造データを二次元データへ変
換する変換手段にあって、階層構造を順次たどり要素名
を調べ、現在行に同名の要素が再度現れた個所の前の要
素までを行として、個々の要素を列とするとともに、不
足する列は前行をコピーするようにしたものである。
Means for Solving the Problems In order to achieve the above object, a two-dimensional data conversion means for hierarchically structured data according to the present invention has a repetitive element, such as an XML document having a name assigned to the element. In the conversion means for converting the hierarchical structure data into two-dimensional data, the hierarchical structure is sequentially traced, the element names are checked, and the elements up to the element where the element of the same name reappears on the current line are lined up, and each element is In addition to the columns, the missing columns are copied from the previous row.

【0005】[0005]

【作用】以下、本発明に係る階層構造データの二次元デ
ータ変換手段について説明する。本発明に係る階層構造
データの二次元データ変換手段によれば、繰り返しの要
素をもち、要素に名前が付された階層構造を順次たどり
要素名を調べ、現在行に同名の要素が再度現れた個所の
前の要素までを行として、個々の要素を列とするととも
に、不足する列は前行をコピーするようにしたから、こ
れにより、階層構造データは、行・列の二次元データに
変換されることとなる。
The means for converting two-dimensional hierarchical data according to the present invention will be described below. According to the means for converting two-dimensional data of hierarchical structure data according to the present invention, the element name is checked by sequentially following the hierarchical structure having repetitive elements and the names given to the elements, and the element having the same name appears again in the current line. Rows up to the element before the location are used as rows, individual elements are columns, and missing columns are copied from the previous row, so hierarchical structure data is converted to row and column two-dimensional data Will be done.

【0006】[0006]

【実施例】以下、本発明に係る階層構造データの二次元
データ変換手段について、実施例に基づき説明する。図
1は本発明に係る階層構造データの二次元データ変換手
段の概略構成図である。図において、左がXML文書
1、右が二次元データ(表)2を示し、本発明に係る階
層構造データの二次元データ変換手段3により、XML
文書1を二次元データ(表)2に変換可能としている。
X、Y、Zは要素の名前(要素名)、A1、A2、B1、B2、
C1、C2、D1、D2は要素内容(データ)である。図2は本
発明に係る階層構造データの二次元データ変換手段(プ
ログラム)の概略フローチャート図である。図3〜図5
は本発明に係る階層構造データの二次元データ変換過程
を示す説明図である。図において、XML文書のルート
要素の中に繰り返し要素が入っている。まずコンピュー
タは、1ノードを取り出す(S11)。この実施例で
は、要素X(A1)を取り出し、現在行に同名データが有
るか無いかを判定する(S14)。この場合、X(A1)
は現在行にない名前であるため、現在行の列としてX
(A1)を保存する(S15)。同様にして要素Y(B
1)、要素Z(C1)を順次に取り出し、現在行に同名デ
ータが有るか無いかを判定し(S14)。いずれも現在
行にない名前であるので、現在行の列としてY(B1)、
Z(C1)をそれぞれ保存する(S15)(図3−1)。次
いで、要素Z(D1)を取り出し、現在行に同名データが
有るか無いかを判定する(S14)。この場合、同名の
要素名Z(C1)が既に出ているので、前行{空白、空
白、空白}と現在行{X(A1)、Y(B1)、Z(C1)}
を比較し、不足する列があるかどうかを判定する(S1
6)、(S17)。この場合、現在行の列はすべて埋ま
り、不足する列はないので、現在行{X(A1)、Y(B
1)、Z(C1)}を1行出力する(S18)(図3−
2)。そして、この現在行{X(A1)、Y(B1)、Z(C
1)}を前行として保存し、現在行をリセットし、上記
要素Z(D1)を現在行の列として保存する(S15)
(図3−3)。続いて、要素A(A2)を取り出し、Nod
e階層が浅くなったか、あるいは深くなるまたは変わら
ないか、について判定し(S13)、Node階層が浅
くなったので、前行{X(A1)、Y(B1)、Z(C1)}
と現在行{空白、空白、Z(D1)}を比較し、不足する
列があるかどうかを判定する(S16)、(S17)。
この場合、現在行の列は不足しているので、前行{X
(A1)、Y(B1)、Z(C1)}から現在行へ不足する列
をコピーし(S19)、確定したこの現在行{X(A
1)、Y(B1)、Z(D1)}を1行出力する(S18)
(図4−1)。そして、この現在行{X(A1)、Y(B
1)、Z(D1)}を前行として保存し、現在行をリセッ
トし、上記要素A(A2)を現在行の列として保存する
(S15)(図4−2)。次に、要素Y(B2)、要素Z
(C2)を順次に取り出し、現在行に同名データが有るか
無いかを判定し(S14)。いずれも現在行にない名前
であるので、現在行の列としてY(B2)、Z(C2)をそ
れぞれ保存する(S15)(図4−3)。次に、要素Z
(D2)を取り出し、現在行に同名データが有るか無いか
を判定する(S14)。この場合、同名の要素名Z(C
2)が既に出ているので、前行{X(A1)、Y(B1)、
Z(D1)}と現在行{X(A2)、Y(B2)、Z(C2)}
を比較し、不足する列があるかどうかを判定する(S1
6)、(S17)。現在行の列はすべて埋まり、不足す
る列はないので、現在行{X(A2)、Y(B2)、Z(C
2)}を1行出力する(S18)(図5−1)。そして、
現在行{X(A2)、Y(B2)、Z(C2)}を前行として
保存し、現在行をリセットし、上記要素Z(D2)を現在
行の列として保存する(S15)(図5−2)。以上で、
ノードすべてを取り出したので、S21に示す処理に移
り、前行{X(A2)、Y(B2)、Z(C2)}と現在行
{空白、空白、Z(C2)}を比較し、不足する列がある
かどうかを判定する(S16)、(S17)。この場
合、現在行の列は不足しているので、前行{X(A2)、
Y(B2)、Z(C2)}から現在行へ不足するXおよYの
列をコピーし(S19)、現在行{X(A2)、Y(B
2)、Z(D2)}を1行出力し(S18)して処理て終
了する(図5−3)。これにより、XML文書はすべて2
行・3列の二次元データへ変換されることとなる。
DETAILED DESCRIPTION OF THE PREFERRED EMBODIMENTS The means for converting two-dimensional data of hierarchical data according to the present invention will be described below based on embodiments. FIG. 1 is a schematic configuration diagram of a two-dimensional data conversion unit for hierarchical data according to the present invention. In the figure, the left side shows the XML document 1 and the right side shows the two-dimensional data (table) 2.
The document 1 can be converted into two-dimensional data (table) 2.
X, Y, Z are element names (element names), A1, A2, B1, B2,
C1, C2, D1, and D2 are element contents (data). FIG. 2 is a schematic flow chart of the two-dimensional data conversion means (program) for hierarchical structure data according to the present invention. 3 to 5
FIG. 3 is an explanatory diagram showing a process of converting two-dimensional data of hierarchical structure data according to the present invention. In the figure, a repeated element is included in the root element of the XML document. First, the computer takes out one node (S11). In this embodiment, the element X (A1) is extracted, and it is determined whether or not the same data exists in the current row (S14). In this case, X (A1)
Is a name that is not in the current row, so X
(A1) is saved (S15). Similarly, element Y (B
1) The elements Z (C1) are sequentially extracted, and it is determined whether or not the same data exists in the current row (S14). Since none of the names are in the current row, Y (B1),
Z (C1) is stored (S15) (FIG. 3-1). Next, the element Z (D1) is extracted, and it is determined whether or not the same data exists in the current row (S14). In this case, since the element name Z (C1) having the same name has already appeared, the previous line {blank, blank, blank} and the current line {X (A1), Y (B1), Z (C1)}
To determine whether there is a missing column (S1).
6), (S17). In this case, all the columns of the current row are filled and there are no missing columns, so the current row {X (A1), Y (B
1), one line of Z (C1)} is output (S18) (FIG. 3).
2). Then, the current row {X (A1), Y (B1), Z (C
1) Save} as the previous row, reset the current row, and save the element Z (D1) as a column of the current row (S15)
(FIG. 3-3). Subsequently, the element A (A2) is taken out and Nod
It is determined whether the e-layer has become shallow or deeper or unchanged (S13). Since the Node hierarchy has become shallower, the preceding row {X (A1), Y (B1), Z (C1)}.
And the current line {blank, blank, Z (D1)} to determine whether there is a missing column (S16), (S17).
In this case, since the column of the current row is insufficient, the previous row $ X
(A1), Y (B1), Z (C1)}, copy the missing columns to the current row (S19), and determine the current row {X (A
1), Y (B1), Z (D1)} are output as one line (S18)
(FIG. 4-1). Then, the current row $ X (A1), Y (B
1), Z (D1)} is stored as the previous row, the current row is reset, and the element A (A2) is stored as a column of the current row (S15) (FIG. 4-2). Next, element Y (B2), element Z
(C2) is sequentially taken out, and it is determined whether or not the same data exists in the current line (S14). Since none of the names are in the current row, Y (B2) and Z (C2) are stored as columns of the current row, respectively (S15) (FIG. 4C). Next, the element Z
(D2) is extracted, and it is determined whether or not the same data exists in the current line (S14). In this case, the element name Z (C
Since 2) has already appeared, the previous line X (A1), Y (B1),
Z (D1)} and current line {X (A2), Y (B2), Z (C2)}
To determine whether there is a missing column (S1).
6), (S17). Since all columns in the current row are filled and there are no missing columns, the current row {X (A2), Y (B2), Z (C
2)} is output in one line (S18) (FIG. 5-1). And
The current row {X (A2), Y (B2), Z (C2)} is stored as the previous row, the current row is reset, and the element Z (D2) is stored as a column of the current row (S15) (FIG. 5-2). Above,
Since all the nodes have been extracted, the process moves to the processing shown in S21, and the previous line {X (A2), Y (B2), Z (C2)} is compared with the current line {blank, blank, Z (C2)}, and the It is determined whether there is a column to be executed (S16), (S17). In this case, since the column of the current row is insufficient, the previous row {X (A2),
The missing X and Y columns are copied from Y (B2), Z (C2)} to the current row (S19), and the current row {X (A2), Y (B
2), one line of Z (D2)} is output (S18), and the processing is terminated (FIG. 5C). As a result, all XML documents are 2
It is converted into two-dimensional data of rows and three columns.

【0007】尚、上記実施例では、本発明をXML文書
に適用した実施例を示したが、XML文書に限らず、繰
り返しの要素をもち、要素に名前が付されたその他の階
層構造データに適用できることは勿論である。また、上
記フローチャートは実施例であり、階層構造を順次たど
り要素名を調べ、現在行に同名の要素が再度現れた個所
の前の要素までを行として、個々の要素を列とするとと
もに、不足する列は前行をコピーするようにする手順で
ある限り、このフローチャートに限定されない。
In the above embodiment, an embodiment in which the present invention is applied to an XML document has been described. However, the present invention is not limited to an XML document, but may be applied to other hierarchical data having repetitive elements and having names given to the elements. Of course, it can be applied. Also, the above flowchart is an example, and the hierarchical structure is sequentially traced to check the element names, the element up to the point where the element with the same name reappears in the current line is set as a row, and each element is set as a column, and The column to be copied is not limited to this flowchart as long as the procedure is to copy the previous row.

【0008】[0008]

【発明の効果】以上の説明から明らかなように、本発明
による階層構造データの二次元データ変換手段によれ
ば、繰り返しの要素をもち、要素に名前が付されたXM
L文書のごとき階層構造データを、変換ルールが難解な
CSS、XSL、XSLTなどのスタイルシート言語を
使用することなく、簡単な変換手段により二次元データ
に変換して、例えば行・列の表として画面表示やプリン
トアウトなどができるなど、種々の用途に利用でき、し
たがって、熟練技術者を確保する面倒もなく、低コスト
で導入でき、変換速度も早いなどの顕著な効果が得られ
る。
As is apparent from the above description, according to the means for converting hierarchical data into two-dimensional data according to the present invention, an XM having repeated elements and named
An L document or other hierarchical structure data is converted into two-dimensional data by simple conversion means without using a style sheet language such as CSS, XSL, XSLT, etc., whose conversion rules are difficult. It can be used for various purposes such as screen display and printout, so that it can be introduced at low cost without the trouble of securing skilled technicians, and remarkable effects such as high conversion speed can be obtained.

【図面の簡単な説明】[Brief description of the drawings]

【図1】本発明に係る階層構造データの二次元データ変
換手段の概略構成図である。
FIG. 1 is a schematic configuration diagram of a two-dimensional data conversion unit for hierarchical data according to the present invention.

【図2】本発明に係る階層構造データの二次元データ変
換手段(プログラム)の概略フローチャートである。
FIG. 2 is a schematic flowchart of a two-dimensional data conversion means (program) for hierarchically structured data according to the present invention.

【図3】本発明に係る階層構造データの二次元データ変
換過程を示す説明図である。
FIG. 3 is an explanatory diagram showing a process of converting hierarchical structure data into two-dimensional data according to the present invention.

【図4】本発明に係る階層構造データの二次元データ変
換過程を示す説明図である。
FIG. 4 is an explanatory diagram showing a process of converting hierarchical structure data into two-dimensional data according to the present invention.

【図5】本発明に係る階層構造データの二次元データ変
換過程を示す説明図である。
FIG. 5 is an explanatory diagram showing a process of converting two-dimensional data of hierarchical structure data according to the present invention.

【符号の説明】[Explanation of symbols]

1 XML文書 2 二次元データ(表) 3 階層構造データの二次元データ変換手段 1 XML document 2 2D data (table) 3 2D data conversion means for hierarchical structure data

Claims (1)

【特許請求の範囲】[Claims] 【請求項1】 繰り返しの要素をもち、要素に名前が付
されたXML文書のごとき階層構造データを二次元デー
タへ変換する変換手段にあって、階層構造を順次たどり
要素名を調べ、現在行に同名の要素が再度現れた個所の
前の要素までを行として、個々の要素を列とするととも
に、不足する列は前行をコピーするようにしたことを特
徴とする階層構造データの二次元データ変換手段。
1. A conversion means for converting hierarchical structure data, such as an XML document having repeated elements and having a name to each element, into two-dimensional data. Two-dimensional hierarchical data, characterized in that the elements up to the point where the element of the same name reappears are used as rows, individual elements are used as columns, and missing columns are copied from the previous row. Data conversion means.
JP2001004173A 2001-01-11 2001-01-11 Means for converting two-dimensional data for hierarchical structure data Pending JP2002207721A (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
JP2001004173A JP2002207721A (en) 2001-01-11 2001-01-11 Means for converting two-dimensional data for hierarchical structure data

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
JP2001004173A JP2002207721A (en) 2001-01-11 2001-01-11 Means for converting two-dimensional data for hierarchical structure data

Publications (1)

Publication Number Publication Date
JP2002207721A true JP2002207721A (en) 2002-07-26

Family

ID=18872402

Family Applications (1)

Application Number Title Priority Date Filing Date
JP2001004173A Pending JP2002207721A (en) 2001-01-11 2001-01-11 Means for converting two-dimensional data for hierarchical structure data

Country Status (1)

Country Link
JP (1) JP2002207721A (en)

Cited By (3)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
JP2006163820A (en) * 2004-12-07 2006-06-22 Mitsubishi Electric Corp Data converter
WO2007006148A1 (en) * 2005-07-07 2007-01-18 Acl Services Ltd. Method and apparatus for processing xml tagged data
US8051373B2 (en) 2003-02-28 2011-11-01 Microsoft Corporation Method and system for converting a schema-based hierarchical data structure into a flat data structure

Cited By (4)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US8051373B2 (en) 2003-02-28 2011-11-01 Microsoft Corporation Method and system for converting a schema-based hierarchical data structure into a flat data structure
JP2006163820A (en) * 2004-12-07 2006-06-22 Mitsubishi Electric Corp Data converter
JP4606862B2 (en) * 2004-12-07 2011-01-05 三菱電機株式会社 Data converter
WO2007006148A1 (en) * 2005-07-07 2007-01-18 Acl Services Ltd. Method and apparatus for processing xml tagged data

Similar Documents

Publication Publication Date Title
CN100547581C (en) Method, the system of generating structure pattern candidate target
WO2016032080A1 (en) Chart conversion system using metadata and method therefor
CN102215126B (en) The generation method and device of performance report
JP2000155859A (en) Method for preparing mesh for analyzing numerical value and its device
CN1980247A (en) Image formation device having a web service function
CN104462460A (en) Method of constructing REST (representational state transfer) styled ontology annotation visualization system
JP5312103B2 (en) Screen display program generation device, screen display system, computer program, and screen display program generation method
US20040143778A1 (en) System and method for generating an XML-based fault model
JP2002207721A (en) Means for converting two-dimensional data for hierarchical structure data
JPWO2005098662A1 (en) Document processing apparatus and document processing method
US20070006071A1 (en) Method for transforming a tree structure into a more human-comprehensible document
JP4344105B2 (en) Source file generator
CN110532257B (en) Method and system for visually presenting family tree data
Li et al. Automated creation of navigable REST services based on REST chart
CN111753393A (en) BOM structure change propagation path selection method and information system
JP4481856B2 (en) Database creation system
JPWO2006046664A1 (en) Time sharing management device, document creation device, document browsing device, time sharing management method, document creation method, and document browsing method
JP2003140960A (en) Data conversion method and program for xml data
JP2003162533A (en) Schema-integrated conversion system, schema-integrated conversion method, and schema-integrated conversion program
JP6287267B2 (en) Comment management system, comment management method, and program thereof
JP6043114B2 (en) Insurance data processing device and insurance contract system
JPH09190526A (en) System for transforming drawing data form
JPH04289921A (en) Display method for multiple succession chart
JP2001028032A (en) Image information processor and mark sheet
JPH04153759A (en) Development system for network defining program