JP4675748B2 - XML data conversion device and XML data restoration device - Google Patents

XML data conversion device and XML data restoration device Download PDF

Info

Publication number
JP4675748B2
JP4675748B2 JP2005313226A JP2005313226A JP4675748B2 JP 4675748 B2 JP4675748 B2 JP 4675748B2 JP 2005313226 A JP2005313226 A JP 2005313226A JP 2005313226 A JP2005313226 A JP 2005313226A JP 4675748 B2 JP4675748 B2 JP 4675748B2
Authority
JP
Japan
Prior art keywords
node
bit
unit
depth
xml data
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.)
Active
Application number
JP2005313226A
Other languages
Japanese (ja)
Other versions
JP2007122382A (en
Inventor
良介 綿部
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.)
Mitsubishi Electric Corp
Original Assignee
Mitsubishi Electric Corp
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 Mitsubishi Electric Corp filed Critical Mitsubishi Electric Corp
Priority to JP2005313226A priority Critical patent/JP4675748B2/en
Publication of JP2007122382A publication Critical patent/JP2007122382A/en
Application granted granted Critical
Publication of JP4675748B2 publication Critical patent/JP4675748B2/en
Active legal-status Critical Current
Anticipated expiration legal-status Critical

Links

Images

Description

この発明は、XML(Extensible Markup Language:拡張可能なマーク付け言語)で記述された木構造を有するXML文書のデータベースに関するもので、特にXML文書を表形式のテーブルデータに変換するXMLデータ変換装置及びこのようなテーブルデータからXML文書に復元するXMLデータ復元装置に関するものである。   The present invention relates to an XML document database having a tree structure described in XML (Extensible Markup Language), and more particularly to an XML data conversion device for converting an XML document into tabular table data, and The present invention relates to an XML data restoration apparatus for restoring an XML document from such table data.

XML文書をテーブル形式に変換してデータベースに格納し、また格納したデータを高速に検索する仕組みは、従来から様々な手法がとられてきた。   Conventionally, various methods have been adopted for converting an XML document into a table format and storing it in a database, and retrieving the stored data at high speed.

代表的な手法としては、DTD(Document Type Definition)やXML Schema、RELAX NG等、あるXML文書の構造を定義しているスキーマから、テーブルへ変換するためのルールを作成し、それに基づいてノードの種類毎、あるいはノードの名称毎に複数のテーブルへ変換する方法がある。例えば、特許文献1では、スキーマを元にして同じ名称の要素毎にテーブルを作成し、テーブルには各要素の内容および属性値の項目とテーブル間のリンク関係が格納されている。   A typical method is to create a rule for converting a schema from a schema defining the structure of an XML document, such as DTD (Document Type Definition), XML Schema, RELAX NG, etc. There is a method of converting into a plurality of tables for each type or for each node name. For example, in Patent Document 1, a table is created for each element having the same name based on the schema, and the contents of each element and attribute value items and the link relationship between the tables are stored in the table.

特開2004−178084号公報JP 2004-178084 A

上記従来の手法の問題点として、第1の問題点は、変換にスキーマを必須とすることである。このため、スキーマを持つ妥当なXML文書を変換することはできても、スキーマを必要としない検証済みXML文書を変換することができないという課題があった。
また、第2の問題点は、テーブルが複数必要となることである。テーブルの数が多くなるにつれて、格納や検索の処理が煩雑になるという課題があった。
As a problem of the conventional method, the first problem is that a schema is essential for conversion. Therefore, there is a problem that a valid XML document having a schema can be converted, but a verified XML document that does not require a schema cannot be converted.
The second problem is that a plurality of tables are required. As the number of tables increases, there is a problem that storage and retrieval processing becomes complicated.

この発明は上記のような課題を解決するためになされたもので、スキーマを必要としない検証済みXML文書を、元のXML文書に復元できるような単一のテーブルに変換することのできるXMLデータ変換装置及びXMLデータ復元装置を得ることを目的とする。   The present invention has been made to solve the above problems, and XML data that can convert a verified XML document that does not require a schema into a single table that can be restored to the original XML document. An object is to obtain a conversion device and an XML data restoration device.

この発明に係るXMLデータ変換装置は、XMLデータから各ノードの識別情報を抽出するノード名称抽出部と、XMLデータの各ノードの種類に応じて、予め決められた種類のノードに対してのみビットを付与し、それ以外の種類のノードに対してはビットを付与しないビット付与部と、各ノードを木構造で表した場合のノード深さを測定するノード深さ測定部と、ビット付与部で付与されたビット付与の有無と、ノード深さ測定部で測定されたノード深さに基づいて、ノード深さの測定値をn(nは2以上の任意の自然数)倍し、かつ、ビットが付与されている場合は1を加えた数値を生成し、その数値を各ノードの識別情報に対応する数値として出力するビット・深さ結合部とを備えたものである。 The XML data conversion apparatus according to the present invention includes a node name extraction unit that extracts identification information of each node from the XML data, and a bit only for a predetermined type of node according to the type of each node of the XML data. A bit grant unit that does not give bits to other types of nodes, a node depth measurement unit that measures the node depth when each node is represented by a tree structure, and a bit grant unit Based on the presence / absence of a given bit and the node depth measured by the node depth measurement unit, the measured value of the node depth is multiplied by n (n is an arbitrary natural number of 2 or more), and the bit is If it is given, it is provided with a bit / depth combination part that generates a numerical value to which 1 is added and outputs the numerical value as a numerical value corresponding to the identification information of each node.

この発明のXMLデータ変換装置は、XMLデータの各ノードの種類に応じたビット付与の有無と、ノード深さとに基づいて、各ノードの種類とノード深さとを示す数値を生成し、各ノードの識別情報に対応する数値として出力するようにしたので、テーブルデータを生成するためにスキーマを必要とせずにXMLの構造を小さい数値で表現でき、また、元のXMLデータに復元できるような単一のテーブルデータに変換することができる。 The XML data conversion apparatus according to the present invention generates a numerical value indicating the type of each node and the node depth based on the presence / absence of bit assignment according to the type of each node of the XML data and the node depth. Since it is output as a numerical value corresponding to the identification information, the XML structure can be expressed with a small numerical value without requiring a schema to generate table data, and can be restored to the original XML data. Can be converted into table data.

実施の形態1.
本発明では、XML文書のノードが、XML文書において最も基本となる情報単位である「空でない要素」、内容を持たない空の要素である「空要素」、XML文書の中で要素に対して付加的な情報を付け加える「属性」、要素の値である「要素のテキスト」、属性の値である「属性のテキスト」の5種類から構成されるものとする。
Embodiment 1 FIG.
In the present invention, the nodes of the XML document include “non-empty element” which is the most basic information unit in the XML document, “empty element” which is an empty element having no content, and elements in the XML document. It is assumed that there are five types of “attribute” to which additional information is added, “element text” that is an element value, and “attribute text” that is an attribute value.

一方、XML文書のノードとして、その文書がXML文書であることを宣言する「XML宣言」、アプリケーションへの処理命令を記述する「処理命令」、XML文書要素として論理や意味構造を無視する文を記述する「CDATAセクション」、XML文書要素として解釈されない文を記述する「コメント」、文字コードによる文字の参照を記述する「文字参照」、文字列やファイルを表すエンティティを記述する「エンティティ参照」は含まれないものとする。ここで、「XML宣言」、「処理命令」、「CDATAセクション」、「コメント」、「文字参照」、「エンティティ参照」は、XML文書の中で主要なノードでないので、XML文書のデータベースにおいて考慮しなくても特に大きな問題はない。   On the other hand, as an XML document node, an “XML declaration” that declares that the document is an XML document, a “processing instruction” that describes a processing instruction to the application, and a statement that ignores logic or semantic structure as an XML document element “CDATA section” to describe, “comment” to describe a sentence that is not interpreted as an XML document element, “character reference” to describe a character reference by character code, and “entity reference” to describe an entity representing a character string or a file It shall not be included. Here, since “XML declaration”, “processing instruction”, “CDATA section”, “comment”, “character reference”, and “entity reference” are not main nodes in the XML document, they are considered in the database of the XML document. There is no big problem even if not.

また、ノード間の無視できる改行と空白(いわゆるignorableWhiteSpace)をノードとして扱わず無視することとする。例えば、後述する図2のXML文書において、<aaa>から<bbb/>まで、<bbb/>から<ccc ddd="eee">まで、</ccc>から</aaa>までにはそれぞれ改行や空白があるが、それらをノードとして扱わず無視することとする。   Further, ignorable line breaks and spaces (so-called “ignorable white space”) between nodes are not treated as nodes and are ignored. For example, in the XML document of FIG. 2 described later, line breaks are made from <aaa> to <bbb />, from <bbb /> to <ccc ddd = "eee">, and from </ ccc> to </ aaa>. There are spaces and spaces, but they are not treated as nodes and ignored.

また、XML文書の代表的なAPI(Application Programming Interface)であるDOM(Document Object Model)では、「属性」を「要素」の子ノードとして扱わない。本発明では「属性」を「要素」の子ノードとして扱うが、特に大きな問題はない。   Also, in DOM (Document Object Model) which is a typical API (Application Programming Interface) of an XML document, “attribute” is not handled as a child node of “element”. In the present invention, “attribute” is handled as a child node of “element”, but there is no particular problem.

図1は、本発明の実施の形態1によるXMLデータ変換装置及びXMLデータ復元装置を示す構成図である。
図において、XMLデータ変換装置及びXMLデータ復元装置は、XML文書格納部10、テーブル格納部20、変換部30、復元部40から構成されており、変換部30がXMLデータ変換装置に、また、復元部40がXMLデータ復元装置に対応している。
FIG. 1 is a configuration diagram showing an XML data conversion device and an XML data restoration device according to Embodiment 1 of the present invention.
In the figure, the XML data conversion device and the XML data restoration device are composed of an XML document storage unit 10, a table storage unit 20, a conversion unit 30, and a restoration unit 40, and the conversion unit 30 serves as the XML data conversion device. The restoration unit 40 corresponds to an XML data restoration device.

XML文書格納部10は、変換部30によってテーブル形式のデータに変換する元データであると共に、復元部40によって復元されたXML文書を格納するための格納部である。変換部30は、XML文書格納部10に格納されているXML文書をテーブル形式のデータに変換してテーブル格納部20に送出する機能部であり、ノード名称抽出部31、ビット付与部32、ノード深さ測定部33、ビット・深さ結合部34を備えている。   The XML document storage unit 10 is original data that is converted into table format data by the conversion unit 30 and is a storage unit for storing the XML document restored by the restoration unit 40. The conversion unit 30 is a functional unit that converts an XML document stored in the XML document storage unit 10 into data in a table format and sends the data to the table storage unit 20, and includes a node name extraction unit 31, a bit addition unit 32, and a node A depth measurement unit 33 and a bit / depth combination unit 34 are provided.

ノード名称抽出部31は、XML文書格納部10から取り出されたXML文書からノードの識別情報としてノード名称を抽出する機能部である。ビット付与部32は、XML文書から上述したノードの種類を表す情報である「空でない要素」「空要素」「属性」「要素のテキスト」「属性のテキスト」に対して、その種類を表すビットを付与する機能部である。即ち、「空でない要素」、「空要素」「属性」「要素のテキスト」「属性のテキスト」のうち、「属性」と「要素のテキスト」に対してビットをonとし、それ以外はビットをoffとする。ノード深さ測定部33は、XML文書の各ノードを木構造で表した場合の深さを測定する機能部である。ビット・深さ結合部34は、ビット付与部32で付与されたビットとノード深さ測定部33で測定された深さを示す値とに基づいて、各ノードの種類とノード深さを示す数値を生成し、これをノード名称抽出部31で抽出されたノード名称に対応させてテーブル形式のデータとして出力する機能部である。   The node name extraction unit 31 is a functional unit that extracts a node name from the XML document extracted from the XML document storage unit 10 as node identification information. The bit assigning unit 32 is a bit indicating the type of “non-empty element”, “empty element”, “attribute”, “element text”, and “attribute text” that are information indicating the type of the node described above from the XML document. It is a functional part that gives That is, of “non-empty element”, “empty element”, “attribute”, “element text” and “attribute text”, the bit is turned on for “attribute” and “element text”, and the bit is set otherwise. off. The node depth measurement unit 33 is a functional unit that measures the depth when each node of the XML document is represented by a tree structure. The bit / depth combination unit 34 is a numerical value indicating the type of node and the node depth based on the bit provided by the bit providing unit 32 and the value indicating the depth measured by the node depth measurement unit 33. Is generated in correspondence with the node name extracted by the node name extraction unit 31, and is output as data in a table format.

復元部40は、テーブル格納部20に格納されているテーブル形式のデータからXML文書を復元する機能部であり、ノード名称付与部41、ノード種類復元部42、木構造復元部43、ビット・深さ分割部44を備えている。これらノード名称付与部41〜ビット・深さ分割部44は、それぞれ、ノード名称抽出部31〜ビット・深さ結合部34における変換動作に対応した復元動作を行うものである。   The restoration unit 40 is a functional unit that restores an XML document from data in a table format stored in the table storage unit 20, and includes a node name assignment unit 41, a node type restoration unit 42, a tree structure restoration unit 43, a bit / depth A thickness division unit 44 is provided. The node name assigning unit 41 to the bit / depth dividing unit 44 perform a restoring operation corresponding to the conversion operation in the node name extracting unit 31 to the bit / depth combining unit 34, respectively.

ビット・深さ分割部44は、テーブルデータにおける各ノードに対応した数値からノードの種類と木構造におけるノードの深さを示す値とを抽出する機能部である。木構造復元部43は、ビット・深さ分割部44で抽出したノード深さを示す値に基づいて、XML文書の木構造を復元する機能部である。ノード種類復元部42は、ビット・深さ分割部44で抽出したノード種類を示す値に基づいて、木構造で示された各ノードを、ノードの種類である「空でない要素」「空要素」「属性」「要素のテキスト」「属性のテキスト」として復元する機能部である。ノード名称付与部41は、ノード種類復元部42で復元された各ノードに対して、ノードの識別情報であるノード名称を付与しXML文書としてXML文書格納部10に出力する機能部である。   The bit / depth division unit 44 is a functional unit that extracts the type of the node and the value indicating the depth of the node in the tree structure from the numerical values corresponding to each node in the table data. The tree structure restoration unit 43 is a functional unit that restores the tree structure of the XML document based on the value indicating the node depth extracted by the bit / depth division unit 44. Based on the value indicating the node type extracted by the bit / depth dividing unit 44, the node type restoration unit 42 converts each node indicated by the tree structure into “non-empty element” and “empty element” which are node types. It is a functional unit that restores as “attribute”, “element text”, and “attribute text”. The node name assigning unit 41 is a functional unit that assigns a node name that is node identification information to each node restored by the node type restoring unit 42 and outputs the node name as an XML document to the XML document storage unit 10.

次に、実施の形態1の動作について説明する。
先ず、XML文書からテーブルデータへ変換する方法について説明する。
Next, the operation of the first embodiment will be described.
First, a method for converting an XML document into table data will be described.

最初に、変換部30が、XML文書格納部10から、テーブルに変換したいXML文書を取り出す。
図2は、XML文書の一例を示す説明図である。
First, the conversion unit 30 takes out an XML document to be converted into a table from the XML document storage unit 10.
FIG. 2 is an explanatory diagram illustrating an example of an XML document.

変換部30では、XML文書を取り出した後、XML文書の各ノードに対して、ノード名称抽出部31、ビット付与部32、ノード深さ測定部33がそれぞれ以下の3つの操作を行う。   In the conversion unit 30, after extracting the XML document, the node name extraction unit 31, the bit assignment unit 32, and the node depth measurement unit 33 perform the following three operations on each node of the XML document.

(1)ノード名称抽出部31が、ノードの名称を取得する。
(2)ビット付与部32が、後にテーブルからXML文書を復元できるようにするためのビット“ノード種類復元ビット”を付与する。具体的には、ビット付与部32では、ノードの種類が「属性」もしくは「要素のテキスト」であった場合に、ノード種類復元ビットonを付与する。ノードの種類が「空でない要素」「空要素」「属性のテキスト」であった場合に、ノード種類復元ビットoffを付与する。
(3)ノード深さ測定部33が、ルートノードの深さを1としたときのノードの深さを測定する。従って、ルートノードの子ノードの深さは2、その子ノードの深さは3、というようになる。
(1) The node name extraction unit 31 acquires the name of the node.
(2) The bit assigning unit 32 assigns a bit “node type restoration bit” for enabling the XML document to be restored later from the table. Specifically, the bit assigning unit 32 assigns the node type restoration bit on when the node type is “attribute” or “element text”. When the node type is “non-empty element”, “empty element”, or “attribute text”, the node type restoration bit off is added.
(3) The node depth measuring unit 33 measures the depth of the node when the depth of the root node is 1. Therefore, the depth of the child node of the root node is 2, the depth of the child node is 3, and so on.

また、(4)ビット・深さ結合部36が、ビット付与部32が付与した(2)のノード種類復元ビット値とノード深さ測定部33が測定した(3)の深さを結合する。具体的には、ノード深さ測定部33が測定した(3)の深さを2倍して、ビット付与部32が付与した(2)のノード種類復元ビット値がonであった場合に更に1を足す。   Further, (4) the bit / depth combining unit 36 combines the node type restoration bit value (2) provided by the bit providing unit 32 and the depth (3) measured by the node depth measuring unit 33. Specifically, when the depth of (3) measured by the node depth measurement unit 33 is doubled and the node type restoration bit value of (2) provided by the bit addition unit 32 is on, further Add one.

以上の操作の後に、変換部30はノードが登場する順番に、n番目のノードであればノード名称抽出部31で抽出した(1)のノードの名称をテーブルのn行目の1列目、ビット・深さ結合部36で結合した(4)の値をテーブルのn行目の2列目にそれぞれ格納する。従って、ノードの数がn個であるXML文書は、n行2列のテーブルに変換できることになる。   After the above operation, in the order in which the nodes appear, the conversion unit 30 extracts the name of the node of (1) extracted by the node name extraction unit 31 in the first column of the nth row of the table if it is the nth node, The values of (4) combined by the bit / depth combining unit 36 are stored in the second column of the nth row of the table. Therefore, an XML document with n nodes can be converted into a table with n rows and 2 columns.

(1)〜(4)の具体的な操作を、図2に示すXML文書を例に説明する。
図3は、図2に示すXML文書の木構造を示す説明図である。
図4は、図2に示すXML文書を変換したテーブルの説明図である。
Specific operations (1) to (4) will be described by taking the XML document shown in FIG. 2 as an example.
FIG. 3 is an explanatory diagram showing a tree structure of the XML document shown in FIG.
FIG. 4 is an explanatory diagram of a table obtained by converting the XML document shown in FIG.

先ず、aaaのノードでは、ノード名称抽出部31がノードの名称aaaを抽出する。aaaのノードは「空でない要素」のため、ビット付与部32がノード種類復元ビットoffを付与する。aaaのノードはルートノードで、ルートノードの深さを1としているので、ノード深さ測定部33は深さ1を得る。ビット・深さ結合部36は、深さ1を2倍して2を得る。以上の操作により、変換部30はテーブルの1行目の1列目にaaaを、1行目の2列目に2を格納する。   First, in the node aaa, the node name extraction unit 31 extracts the node name aaa. Since the node of aaa is “a non-empty element”, the bit assigning unit 32 assigns the node type restoration bit off. Since the node aaa is a root node and the depth of the root node is 1, the node depth measurement unit 33 obtains a depth of 1. The bit / depth combination 36 doubles the depth 1 to obtain 2. With the above operation, the conversion unit 30 stores aaa in the first column of the first row of the table and 2 in the second column of the first row.

次に、bbbのノードでは、ノード名称抽出部31がノードの名称bbbを抽出する。bbbのノードは「空要素」のため、ビット付与部32がノード種類復元ビットoffを付与する。bbbのノードの深さは2なので、ノード深さ測定部33は深さ2を得る。ビット・深さ結合部36は、深さ2を2倍して4を得る。以上の操作により、変換部30はテーブルの2行目の1列目にbbbを、2行目の2列目に4を格納する。   Next, in the node bbb, the node name extraction unit 31 extracts the node name bbb. Since the node of bbb is an “empty element”, the bit assigning unit 32 assigns the node type restoration bit off. Since the node depth of bbb is 2, the node depth measurement unit 33 obtains the depth 2. The bit / depth combination 36 doubles the depth 2 to obtain 4. With the above operation, the conversion unit 30 stores bbb in the first column of the second row of the table and 4 in the second column of the second row.

cccのノードでは、ノード名称抽出部31がノードの名称cccを抽出する。cccのノードは「空でない要素」のため、ビット付与部32がノード種類復元ビットoffを付与する。cccのノードの深さは2なので、ノード深さ測定部33は深さ2を得る。ビット・深さ結合部36は、深さ2を2倍して4を得る。以上の操作により、変換部30はテーブルの3行目の1列目にcccを、3行目の2列目に4を格納する。   In the ccc node, the node name extraction unit 31 extracts the node name ccc. Since the node of ccc is “a non-empty element”, the bit assigning unit 32 assigns the node type restoration bit off. Since the node depth of ccc is 2, the node depth measurement unit 33 obtains the depth 2. The bit / depth combination 36 doubles the depth 2 to obtain 4. With the above operation, the conversion unit 30 stores ccc in the first column of the third row and 4 in the second column of the third row.

dddのノードでは、ノード名称抽出部31がノードの名称dddを抽出する。dddのノードは「属性」のため、ビット付与部32がノード種類復元ビットonを付与する。「属性」は「要素」の子ノードという約束から、dddのノードの深さは3なので、ノード深さ測定部33は深さ3を得る。ビット・深さ結合部36は、深さ3を2倍して1を足し7を得る。以上の操作により、変換部30はテーブルの4行目の1列目にdddを、4行目の2列目に7を格納する。   In the ddd node, the node name extraction unit 31 extracts the node name ddd. Since the node of ddd is “attribute”, the bit assigning unit 32 assigns the node type restoration bit on. Since the “attribute” is a child node of “element”, the depth of the node of ddd is 3, so the node depth measurement unit 33 obtains a depth of 3. The bit / depth coupling part 36 doubles the depth 3 and adds 1 to obtain 7. With the above operation, the conversion unit 30 stores ddd in the first column of the fourth row of the table and 7 in the second column of the fourth row.

eeeのノードでは、ノード名称抽出部31がノードの名称eeeを抽出する。eeeのノードは「属性のテキスト」のため、ビット付与部32がノード種類復元ビットoffを付与する。eeeのノードの深さは4なので、ノード深さ測定部33は深さ4を得る。ビット・深さ結合部36は、深さ4を2倍して8を得る。以上の操作により、変換部30はテーブルの5行目の1列目にeeeを、5行目の2列目に8を格納する。   In the eee node, the node name extraction unit 31 extracts the node name eee. Since the node of eee is “attribute text”, the bit assigning unit 32 assigns the node type restoration bit off. Since the node depth of eee is 4, the node depth measurement unit 33 obtains the depth 4. The bit / depth combination 36 doubles the depth 4 to obtain 8. With the above operation, the conversion unit 30 stores eee in the first column of the fifth row of the table and 8 in the second column of the fifth row.

fffのノードでは、ノード名称抽出部31がノードの名称fffを抽出する。fffのノードは「要素のテキスト」のため、ビット付与部32がノード種類復元ビットonを付与する。fffのノードの深さは3なので、ノード深さ測定部33は深さ3を得る。ビット・深さ結合部36は、深さ3を2倍して1を足し7を得る。以上の操作により、変換部30はテーブルの6行目の1列目にfffを、6行目の2列目に7を格納する。
以上(1)〜(4)の操作により、XML文書が変換されたテーブルは最終的に図4のようになる。
In the fff node, the node name extraction unit 31 extracts the node name fff. Since the node of fff is “element text”, the bit assigning unit 32 assigns the node type restoration bit on. Since the node depth of fff is 3, the node depth measurement unit 33 obtains a depth of 3. The bit / depth coupling part 36 doubles the depth 3 and adds 1 to obtain 7. With the above operation, the conversion unit 30 stores fff in the first column of the sixth row and 7 in the second column of the sixth row.
The table in which the XML document is converted by the operations (1) to (4) is finally as shown in FIG.

テーブルに値が格納された後に、変換部30がテーブル格納部20へ、XML文書を変換したテーブルを格納する。   After the values are stored in the table, the conversion unit 30 stores the table obtained by converting the XML document in the table storage unit 20.

以上の操作により、「空でない要素」「空要素」「属性」「要素のテキスト」「属性のテキスト」のノードからなる検証済みの任意のXML文書を、単一の2列のテーブルに変換することができる。   As a result of the above operation, any verified XML document including nodes of “non-empty element”, “empty element”, “attribute”, “element text”, and “attribute text” is converted into a single two-column table. be able to.

次に、上述の2列のテーブルから元のXML文書へ復元する方法について説明する。
最初に、復元部40がテーブル格納部20から、XML文書に復元したいテーブルを取り出す。そして、復元したいテーブルを取り出した後、ビット・深さ分割部44は、テーブルの2列目の値をノード種類復元ビットとノードの深さに分割する。具体的には、テーブルのn行目の2列目の値を2で割った余りがn番目に付与されるビット、商がn番目のノードの深さとなる。
Next, a method for restoring the original XML document from the above-described two-column table will be described.
First, the restoration unit 40 extracts a table to be restored to an XML document from the table storage unit 20. After taking out the table to be restored, the bit / depth dividing unit 44 divides the values in the second column of the table into the node type restoration bit and the node depth. Specifically, the remainder obtained by dividing the value in the second column of the nth row of the table by 2 is the bit assigned to the nth, and the quotient is the depth of the nth node.

ビット・深さ分割部44の操作を、図4のテーブルを例に説明する。
1行目の2列目の値2を2で割ると余りが0、商が1なので、1番目のノードにはノード種類復元ビットoffが付与されていて、1番目のノードの深さは1である。
2行目の2列目の値4を2で割ると余りが0、商が2なので、2番目のノードにはノード種類復元ビットoffが付与されていて、2番目のノードの深さは2である。
3行目の2列目の値4を2で割ると余りが0、商が2なので、3番目のノードにはノード種類復元ビットoffが付与されていて、3番目のノードの深さは2である。
4行目の2列目の値7を2で割ると余りが1、商が3なので、4番目のノードにはノード種類復元ビットonが付与されていて、4番目のノードの深さは3である。
5行目の2列目の値8を2で割ると余りが0、商が4なので、5番目のノードにはノード種類復元ビットoffが付与されていて、5番目のノードの深さは4である。
6行目の2列目の値7を2で割ると余りが1、商が3なので、6番目のノードにはノード種類復元ビットonが付与されていて、6番目のノードの深さは3である。
The operation of the bit / depth dividing unit 44 will be described with reference to the table of FIG.
When the value 2 in the second column of the first row is divided by 2, the remainder is 0 and the quotient is 1, so the node type restoration bit off is given to the first node, and the depth of the first node is 1. It is.
If the value 4 in the second column in the second row is divided by 2, the remainder is 0 and the quotient is 2, so the node type restoration bit off is given to the second node, and the depth of the second node is 2. It is.
When the value 4 in the second column of the third row is divided by 2, the remainder is 0 and the quotient is 2, so the node type restoration bit off is given to the third node, and the depth of the third node is 2. It is.
When the value 7 in the second column of the fourth row is divided by 2, the remainder is 1 and the quotient is 3, so the node type restoration bit on is assigned to the fourth node, and the depth of the fourth node is 3. It is.
When the value 8 in the second column of the fifth row is divided by 2, the remainder is 0 and the quotient is 4, so the node type restoration bit off is given to the fifth node, and the depth of the fifth node is 4. It is.
When the value 7 in the second column of the sixth row is divided by 2, the remainder is 1 and the quotient is 3, so the node type restoration bit on is assigned to the sixth node, and the depth of the sixth node is 3 It is.

ビット・深さ分割の後に、木構造復元部43が、ビット・深さ分割部44で得た深さの情報からXML文書の木構造を復元する。ここで、自分のノードの親ノードが分かれば、順番に木構造を復元できる。自分のノードの親ノードを探すルールは以下である:「あるノードの親ノードは、そのノードより1つ浅いノードで、自分のノードより前に登場する最も近いノードである。」   After the bit / depth division, the tree structure restoration unit 43 restores the tree structure of the XML document from the depth information obtained by the bit / depth division unit 44. Here, if the parent node of its own node is known, the tree structure can be restored in order. The rule for searching for the parent node of his node is as follows: “A parent node of a node is one shallower than that node and is the closest node that appears before his node.”

木構造復元部43の操作を、図4に示すテーブルを例に説明する。
1番目はルートノードなので親ノードはない。
2番目のノードの親ノードは1番目である。
3番目のノードの親ノードは1番目である。
4番目のノードの親ノードは3番目である。
5番目のノードの親ノードは4番目である。
6番目のノードの親ノードは3番目である。
以上の操作により、2列のテーブルから復元できるXML文書の木構造は図5のようになる。ここで、丸付き数字が図4のテーブルの1行目〜6行目のデータに対応している。また、黒丸数字は、ノード種類復元ビットがonであることを示している。
The operation of the tree structure restoration unit 43 will be described with reference to the table shown in FIG.
Since the first is the root node, there is no parent node.
The parent node of the second node is the first.
The parent node of the third node is the first.
The parent node of the fourth node is the third.
The parent node of the fifth node is the fourth.
The parent node of the sixth node is the third.
The tree structure of the XML document that can be restored from the two-column table by the above operation is as shown in FIG. Here, the numbers with circles correspond to the data in the first to sixth rows of the table of FIG. Further, the black circle numbers indicate that the node type restoration bit is on.

木構造復元の後に、ノード種類復元部42が、ノード種類復元ビットon/offとノードの木構造の情報からノードの種類を復元する。
本発明では、以下の制限によりノードの種類を復元することができる。
・「属性」は必ず子ノードを持ち、それは「属性のテキスト」である。
・「要素のテキスト」は子ノードを持たない。
以上の制限により、(1)ビットがonの「属性」と「要素のテキスト」は、子ノードを持つかどうかで識別することができる。(2)ビットがoffの「要素」と「属性のテキスト」は、親ノードが属性かどうかで識別することができる。(3)更に、「空でない要素」と「空要素」は、子ノードを持つかどうかで識別することができる。
After the tree structure restoration, the node type restoration unit 42 restores the node type from the node type restoration bit on / off and the node tree structure information.
In the present invention, the node type can be restored by the following restrictions.
“Attribute” always has a child node, which is “attribute text”.
• “Element text” has no child nodes.
Due to the above limitations, (1) “attribute” and “element text” whose bit is on can be identified by whether or not they have child nodes. (2) The “element” and the “attribute text” whose bits are off can be identified by whether or not the parent node is an attribute. (3) Further, “non-empty element” and “empty element” can be identified by having a child node.

図6は、復元処理を示すフローチャートである。
即ち、ノード種類復元部42は、ビットがon(ステップST61)で、子ノードを持つ(ステップST62)場合、ノードの種類は「属性」、ビットがon(ステップST61)で、子ノードを持たない(ステップST62)場合は「要素のテキスト」と判定する。また、ビットがoff(ステップST61)で、親ノードが属性でなく(ステップST63)、子ノードを持たない(ステップST64)場合は「空要素」、ビットがoff(ステップST61)で、親ノードが属性でなく(ステップST63)、子ノードを持つ(ステップST64)場合は「空でない要素」、ビットがoff(ステップST61)で、親ノードが属性である(ステップST63)場合は「属性のテキスト」と判定する。
FIG. 6 is a flowchart showing the restoration process.
That is, when the bit is on (step ST61) and has a child node (step ST62), the node type restoration unit 42 has the node type “attribute”, the bit is on (step ST61), and has no child node. In the case of (step ST62), it is determined as “element text”. If the bit is off (step ST61), the parent node is not an attribute (step ST63), and has no child nodes (step ST64), it is “empty element”, the bit is off (step ST61), and the parent node is If it is not an attribute (step ST63) and has a child node (step ST64), "non-empty element", if the bit is off (step ST61) and the parent node is an attribute (step ST63), "attribute text" Is determined.

以下、ノード種類復元部42の具体的な動作を、図4、図5を例に説明する。
1番目のノードでは、ステップST61の条件分岐でNo、ステップST63の条件分岐でNo、ステップST64の条件分岐でYesとなり、1番目のノードは「空でない要素」である。
2番目のノードでは、ステップST61の条件分岐でNo、ステップST63の条件分岐でNo、ステップST64の条件分岐でNoとなり、2番目のノードは「空要素」である。
Hereinafter, the specific operation of the node type restoration unit 42 will be described with reference to FIGS.
The first node is No in the conditional branch in step ST61, No in the conditional branch in step ST63, and Yes in the conditional branch in step ST64, and the first node is an “non-empty element”.
In the second node, No in the conditional branch in step ST61, No in the conditional branch in step ST63, No in the conditional branch in step ST64, and the second node is an “empty element”.

3番目のノードでは、ステップST61の条件分岐でNo、ステップST63の条件分岐でNo、ステップST64の条件分岐でNoとなり、3番目のノードは「空でない要素」である。
4番目のノードでは、ステップST61の条件分岐でYes、ステップST62の条件分岐でYesとなり、4番目のノードは「属性」である。
5番目のノードでは、ステップST61の条件分岐でNo、ステップST63の条件分岐でYesとなり、5番目のノードは「属性のテキスト」である。
6番目のノードでは、ステップST61の条件分岐でYes、ステップST62の条件分岐でNoとなり、6番目のノードは「要素のテキスト」である。
The third node is No in the conditional branch in step ST61, No in the conditional branch in step ST63, and No in the conditional branch in step ST64, and the third node is a “non-empty element”.
The fourth node is Yes in the conditional branch in step ST61 and Yes in the conditional branch in step ST62, and the fourth node is an “attribute”.
The fifth node is No in the conditional branch in step ST61 and Yes in the conditional branch in step ST63, and the fifth node is “text of attribute”.
In the sixth node, Yes in the conditional branch in step ST61, No in the conditional branch in step ST62, and the sixth node is “element text”.

ノードの種類を復元した後に、ノード名称付与部41が、n番目のノードに対し、テーブルのn行目の1列目に格納されているノードの名称を付与する。
ノード名称付与部41の動作を、図4のテーブルを例に説明する。
テーブルの1行目の1列目の値がaaaであるから、1番目のノードの名称はaaaである。
以下、2〜6行目についても同様にノードの名称を得ることができる。
After restoring the node type, the node name assigning unit 41 assigns the name of the node stored in the first column of the nth row of the table to the nth node.
The operation of the node name assigning unit 41 will be described using the table in FIG. 4 as an example.
Since the value in the first column of the first row of the table is aaa, the name of the first node is aaa.
Hereinafter, the names of the nodes can be similarly obtained for the second to sixth lines.

以上のノード名称付与部41〜ビット・深さ分割部44の操作によって得られた情報で、ノードの木構造、各ノードの種類、各ノードの名称がそろったので、XML文書として復元することができる。
最後に、復元部40は、復元されたXML文書をXML文書格納部10へ格納する。
With the information obtained by the operations of the node name assigning unit 41 to the bit / depth dividing unit 44 described above, the tree structure of the node, the type of each node, and the name of each node are complete, so that it can be restored as an XML document. it can.
Finally, the restoration unit 40 stores the restored XML document in the XML document storage unit 10.

以上の操作により、2列のテーブルから「空でない要素」「空要素」「属性」「要素のテキスト」「属性のテキスト」のノードからなる検証済みのXML文書を復元することができる。   With the above operation, a verified XML document including nodes of “non-empty element”, “empty element”, “attribute”, “element text”, and “attribute text” can be restored from the two-column table.

尚、上記実施の形態1において、ビット・深さ結合部34は、深さの測定値を2倍するようにしたが、2倍に限定されるものではなく、倍数は2以上の任意の自然数であればよい。但し、倍数を小さくすることによって2列目の数値が小さくなり、情報量を少なくすることができる。   In the first embodiment, the bit / depth coupling unit 34 doubles the depth measurement value. However, the bit / depth coupling unit 34 is not limited to twice, and the multiple is an arbitrary natural number of 2 or more. If it is. However, by reducing the multiple, the numerical value in the second column is reduced, and the amount of information can be reduced.

以上説明したように、実施の形態1のXMLデータ変換装置によれば、XMLデータを、XMLデータの各ノードの識別情報とこれに対応する数値とからなるテーブルデータに変換するXMLデータ変換装置であって、XMLデータから各ノードの識別情報を抽出するノード名称抽出部と、各ノードの種類に応じて、予め決められた種類のノードに対してのみビットを付与し、それ以外の種類のノードに対してはビットを付与しないビット付与部と、各ノードを木構造で表した場合のノード深さを測定するノード深さ測定部と、ビット付与部で付与されたビット付与の有無と、ノード深さ測定部で測定されたノード深さに基づいて、ノード深さの測定値をn(nは2以上の任意の自然数)倍し、かつ、ビットが付与されている場合は1を加えた数値を生成し、この数値を各ノードの識別情報に対応する数値として出力するビット・深さ結合部とを備えたので、テーブルデータを生成するためにスキーマを必要とせずにXMLの構造を小さい数値で表現でき、また、元のXMLデータに復元できるような単一のテーブルデータに変換することができる。 As described above, according to the XML data conversion apparatus of the first embodiment, the XML data conversion apparatus converts XML data into table data composed of identification information of each node of XML data and numerical values corresponding thereto. A node name extraction unit that extracts identification information of each node from the XML data, and a bit is given only to a predetermined type of node according to the type of each node , and other types of nodes A bit granting unit that does not grant bits, a node depth measurement unit that measures the node depth when each node is represented by a tree structure, presence / absence of bit granting given by the bit granting unit, and a node based on the node depth measurement by the depth measuring unit, the node n a measurement of the depth (n is an arbitrary natural number of 2 or more) multiplied and if the bit is imparted added 1 Generating a number, since a bit depth coupling unit for outputting a value corresponding to the numerical identity of each node, small structures of XML without requiring schema to generate the table data It can be converted into single table data that can be expressed numerically and can be restored to the original XML data.

また、実施の形態1のXMLデータ変換装置によれば、ビット・深さ結合部は、ノード深さの測定値をn(nは2以上の任意の自然数)倍し、かつ、ビットが付与されている場合は1を加えた値を出力するようにしたので、簡単な処理で元のXMLデータに復元できるテーブルデータを変換することができる。   Also, according to the XML data conversion apparatus of the first embodiment, the bit / depth combination unit multiplies the measured value of the node depth by n (n is an arbitrary natural number equal to or greater than 2), and is provided with a bit. In such a case, since a value obtained by adding 1 is output, table data that can be restored to the original XML data can be converted by a simple process.

また、実施の形態1のXMLデータ変換装置によれば、ノードの種類を、空でない要素、空要素、属性、要素のテキスト、属性のテキストとしたので、XMLデータで最も基本となる情報単位でテーブルデータに変換することができる。   Further, according to the XML data conversion apparatus of the first embodiment, since the node type is a non-empty element, empty element, attribute, element text, attribute text, the most basic information unit in XML data. Can be converted to table data.

また、実施の形態1のXMLデータ変換装置では、2列のテーブルの1列目がXML文書のノードの名称、2列目がXML文書のノードの構造と、名称と構造を完全に分離できているので、XML文書を操作し易い。また、ノードの種類とノード深さを合成して2列目で示しているため、テーブルとしての情報量を小さくすることができる。尚、テーブルにおける1列目と2列目とは逆にしてもよい。   In the XML data conversion apparatus according to the first embodiment, the first column of the two-column table is the name of the node of the XML document, and the second column is the structure of the node of the XML document, and the name and structure can be completely separated. Therefore, it is easy to operate the XML document. In addition, since the node type and the node depth are combined and shown in the second column, the amount of information as a table can be reduced. Note that the first and second columns in the table may be reversed.

また、数値でXML文書の構造を保持できるので、XML文書の操作に必要となるメモリが少なくてすむ。更に、単一のテーブルに格納できているので、高速な検索が可能である。   In addition, since the structure of the XML document can be held numerically, less memory is required for the operation of the XML document. Furthermore, since it can be stored in a single table, high-speed search is possible.

また、XML文書では空でない要素を開始タグと終了タグで2回記述する必要があるが、テーブルに格納してしまえば1回の記述ですむ。従って、空要素を除く要素の分だけ、XML文書そのものの圧縮効果が期待できる。   In an XML document, a non-empty element needs to be described twice with a start tag and an end tag. However, once stored in a table, only one description is required. Therefore, the compression effect of the XML document itself can be expected by the number of elements excluding empty elements.

また、実施の形態1のXMLデータ復元装置によれば、XMLデータの各ノードの識別情報とこれに対応する数値とからなるテーブルデータからXMLデータを復元するXMLデータ復元装置であって、各ノードに対応した数値から、ノードの種類をビット付与の有無で示す値と各ノードを木構造で表した場合のノード深さを示す値とを抽出するビット・深さ分割部と、ビット・深さ分割部で抽出したノード深さを示す値に基づいて、XMLデータの木構造を復元する木構造復元部と、ビット・深さ分割部で抽出したノードの種類をビット付与の有無で示す値に基づいて、木構造で示された各ノードの種類を復元するノード種類復元部と、ノード種類復元部でその種類が復元された各ノードに対して識別情報を付与するノード名称付与部とを備えたので、各ノードの識別情報とこれに対応する数値とからなるテーブルデータからXMLデータを復元することができる。 Further, according to the XML data restoring apparatus of the first embodiment, the XML data restoring apparatus restores the XML data from the table data including the identification information of each node of the XML data and the numerical value corresponding thereto. A bit / depth dividing unit that extracts a value indicating the type of node by the presence / absence of bit assignment and a value indicating the node depth when each node is represented by a tree structure, and the bit / depth Based on the value indicating the node depth extracted by the dividing unit, the tree structure restoring unit that restores the tree structure of the XML data, and the value of the node type extracted by the bit / depth dividing unit by the presence or absence of bit assignment A node type restoration unit that restores the type of each node indicated by the tree structure, and a node name assignment unit that assigns identification information to each node whose type has been restored by the node type restoration unit. Because it was example, it is possible to restore the XML data from the table data comprising the number corresponding to the identification information of each node.

また、実施の形態1のXMLデータ復元装置によれば、ビット・深さ分割部は、各ノードの識別情報に対応した数値をn(nは2以上の任意の自然数)で割った余りをノードの種類を示すビット値、商をそのノードの深さを示す値として抽出するようにしたので、簡単な処理でテーブルデータから元のXMLデータに復元することができる。   Also, according to the XML data restoration apparatus of the first embodiment, the bit / depth division unit obtains the remainder obtained by dividing the numerical value corresponding to the identification information of each node by n (n is an arbitrary natural number of 2 or more). Since the bit value and the quotient indicating the type of the node are extracted as the value indicating the depth of the node, it is possible to restore the table data to the original XML data with a simple process.

また、実施の形態1のXMLデータ復元装置によれば、ノードの種類を、空でない要素、空要素、属性、要素のテキスト、属性のテキストとしたので、XMLデータで最も基本となる情報単位でXMLデータに復元することができる。   Further, according to the XML data restoration apparatus of the first embodiment, since the node type is a non-empty element, empty element, attribute, element text, attribute text, the most basic information unit in XML data. It can be restored to XML data.

実施の形態2.
実施の形態1では、ビット付与部32は「属性のテキスト」にノード種類復元ビットoffを付与していた。しかし、ビット付与部32は「属性のテキスト」にノード種類復元ビットonを付与してもよい。即ち、実施の形態2では、図4のテーブルの5番目の数値は9となり、また、図5の木構造の5番目は黒丸数字となる。この場合、ノード種類復元部42は、次のような処理を行うことにより、元のXML文書に復元される。
Embodiment 2. FIG.
In the first embodiment, the bit assigning unit 32 assigns the node type restoration bit off to the “attribute text”. However, the bit assigning unit 32 may assign the node type restoration bit on to the “attribute text”. That is, in the second embodiment, the fifth numerical value in the table of FIG. 4 is 9, and the fifth numerical value in the tree structure of FIG. In this case, the node type restoration unit 42 restores the original XML document by performing the following processing.

図7は、実施の形態2によるノード種類復元部42の復元処理を示すフローチャートである。
即ち、ノード種類復元部42は、ビットがon(ステップST71)で、子ノードを持つ(ステップST72)場合、ノードの種類は「属性」、ビットがon(ステップST71)で、子ノードを持たず(ステップST72)、親ノードが属性である(ステップST73)場合は「属性のテキスト」、ビットがon(ステップST71)で、子ノードを持たず(ステップST72)、親ノードが属性でない(ステップST73)場合は「要素のテキスト」と判定する。また、ビットがoff(ステップST71)で、子ノードを持つ(ステップST74)場合は「空でない要素」、ビットがoff(ステップST71)で、子ノードを持たない(ステップST74)場合は「空要素」と判定する。
FIG. 7 is a flowchart showing restoration processing of the node type restoration unit 42 according to the second embodiment.
That is, when the bit is on (step ST71) and has a child node (step ST72), the node type restoration unit 42 has the node type “attribute”, the bit is on (step ST71), and has no child node. (Step ST72) If the parent node is an attribute (Step ST73), “attribute text”, the bit is on (Step ST71), has no child node (Step ST72), and the parent node is not an attribute (Step ST73). ) Is determined as “element text”. In addition, when the bit is off (step ST71) and has a child node (step ST74), “non-empty element”, and when the bit is off (step ST71) and has no child node (step ST74), “empty element” Is determined.

以下、ノード種類復元部42の動作を、上述した実施の形態2における図4、図5の場合を例に説明する。
1番目のノードでは、ステップST71の条件分岐でNo、ステップST74の条件分岐でYesとなり、1番目のノードは「空でない要素」である。
2番目のノードでは、ステップST71の条件分岐でNo、ステップST74の条件分岐でNoとなり、2番目のノードは「空要素」である。
Hereinafter, the operation of the node type restoration unit 42 will be described by taking the case of FIGS. 4 and 5 in the above-described second embodiment as an example.
The first node is No in the conditional branch in step ST71 and Yes in the conditional branch in step ST74. The first node is a “non-empty element”.
The second node is No in the conditional branch of step ST71, No in the conditional branch of step ST74, and the second node is an “empty element”.

3番目のノードでは、ステップST71の条件分岐でNo、ステップST74の条件分岐でYesとなり、3番目のノードは「空でない要素」である。
4番目のノードでは、ステップST71の条件分岐でYes、ステップST72の条件分岐でYesとなり、4番目のノードは「属性」である。
5番目のノードでは、ステップST71の条件分岐でYes、ステップST72の条件分岐でNo、ステップST73の条件分岐でYesとなり、5番目のノードは「属性のテキスト」である。
6番目のノードでは、ステップST71の条件分岐でYes、ステップST72の条件分岐でNo、ステップST73の条件分岐でNoとなり、6番目のノードは「要素のテキスト」である。
The third node is No in the conditional branch of step ST71 and Yes in the conditional branch of step ST74, and the third node is a “non-empty element”.
In the fourth node, Yes is determined in the conditional branch in Step ST71, and Yes is determined in the conditional branch in Step ST72. The fourth node is an “attribute”.
In the fifth node, Yes in the conditional branch in step ST71, No in the conditional branch in step ST72, Yes in the conditional branch in step ST73, and the fifth node is “attribute text”.
In the sixth node, Yes in the conditional branch in step ST71, No in the conditional branch in step ST72, No in the conditional branch in step ST73, and the sixth node is “element text”.

尚、以上説明したビット付与部32とノード種類復元部42以外の動作は実施の形態1と同様であるため、ここでの説明は省略する。   The operations other than the bit assigning unit 32 and the node type restoring unit 42 described above are the same as those in the first embodiment, and thus the description thereof is omitted here.

以上のように、実施の形態2のXMLデータ変換装置およびXMLデータ復元装置によれば、ビット付与部は「属性のテキスト」にノード種類復元ビットonを付与し、ノード種類復元部は、このビットonに基づいてノードの種類を復元するようにしたので、この実施の形態2においても、実施の形態1と同様の効果が期待できる。   As described above, according to the XML data conversion device and the XML data restoration device of the second embodiment, the bit assignment unit assigns the node type restoration bit on to the “attribute text”, and the node type restoration unit uses this bit. Since the node type is restored based on “on”, the same effect as in the first embodiment can be expected also in the second embodiment.

実施の形態3.
実施の形態1では、XML文書からテーブルへの変換時に、ビット付与部32で「属性のテキスト」でノード種類復元ビットをすべてoffにしていた。また、実施の形態2では、XML文書からテーブルへの変換時に、ビット付与部32で「属性のテキスト」でノード種類復元ビットをすべてonにしていた。ところが、ビット付与部32で「属性のテキスト」でノード種類復元ビットのonとoffが混在してもよい。即ち、実施の形態3では、図4のテーブルの5番目の数値は8または9となり、また、図5の木構造の5番目は白丸数字または黒丸数字となる。この場合、ノード種類復元部42は、次のような処理を行うことにより、元のXML文書に復元される。
Embodiment 3 FIG.
In the first embodiment, at the time of conversion from an XML document to a table, all of the node type restoration bits are turned off in the “attribute text” in the bit assigning unit 32. Further, in the second embodiment, when the XML document is converted into the table, all the node type restoration bits are set to “on” in the “attribute text” in the bit assigning unit 32. However, on and off of the node type restoration bit may be mixed in the “attribute text” in the bit assigning unit 32. That is, in the third embodiment, the fifth numerical value of the table of FIG. 4 is 8 or 9, and the fifth numerical value of the tree structure of FIG. 5 is a white circle number or a black circle number. In this case, the node type restoration unit 42 restores the original XML document by performing the following processing.

図8は、実施の形態3によるノード種類復元部42の復元処理を示すフローチャートである。
即ち、ノード種類復元部42は、ビットがon(ステップST81)で、子ノードを持つ(ステップST82)場合、ノードの種類は「属性」、ビットがon(ステップST81)で、子ノードを持たず(ステップST82)、親ノードが属性である(ステップST83)場合は「属性のテキスト」、ビットがon(ステップST81)で、子ノードを持たず(ステップST82)、親ノードが属性でない(ステップST83)場合は「要素のテキスト」と判定する。これらのステップST81〜ステップST83の動作は実施の形態2のステップST71〜ステップST73の動作と同様である。
FIG. 8 is a flowchart showing restoration processing of the node type restoration unit 42 according to the third embodiment.
That is, when the bit is on (step ST81) and has a child node (step ST82), the node type restoration unit 42 has the node type “attribute”, the bit is on (step ST81), and has no child node. (Step ST82) If the parent node is an attribute (Step ST83), "attribute text", the bit is on (Step ST81), has no child nodes (Step ST82), and the parent node is not an attribute (Step ST83) ) Is determined as “element text”. The operations in these steps ST81 to ST83 are the same as the operations in steps ST71 to ST73 in the second embodiment.

また、ビットがoff(ステップST81)で、親ノードが属性でなく(ステップST84)、子ノードを持たない(ステップST85)場合は「空要素」、ビットがoff(ステップST81)で、親ノードが属性でなく(ステップST84)、子ノードを持つ(ステップST85)場合は「空でない要素」、ビットがoff(ステップST81)で、親ノードが属性である(ステップST84)場合は「属性のテキスト」と判定する。即ち、これらステップST81〜ステップST85の動作は、実施の形態1のステップST61〜ステップST64の動作と同様である。   If the bit is off (step ST81), the parent node is not an attribute (step ST84), and has no child node (step ST85), it is “empty element”, the bit is off (step ST81), and the parent node is If it is not an attribute (step ST84) and has a child node (step ST85), "non-empty element", if the bit is off (step ST81) and the parent node is an attribute (step ST84), "attribute text" Is determined. That is, the operations in steps ST81 to ST85 are the same as the operations in steps ST61 to ST64 of the first embodiment.

以下、ノード種類復元部42の動作を、上述した実施の形態3における図4、図5の場合を例に説明する。
1番目のノードでは、ステップST81の条件分岐でNo、ステップST84の条件分岐でNo、ステップST85の条件分岐でYesとなり、1番目のノードは「空でない要素」である。
2番目のノードでは、ステップST81の条件分岐でNo、ステップST84の条件分岐でNo、ステップST85の条件分岐でNoとなり、2番目のノードは「空要素」である。
3番目のノードでは、ステップST81の条件分岐でNo、ステップST84の条件分岐でNo、ステップST85の条件分岐でNoとなり、3番目のノードは「空でない要素」である。
Hereinafter, the operation of the node type restoration unit 42 will be described by taking the case of FIGS. 4 and 5 in the above-described third embodiment as an example.
In the first node, No in the conditional branch in step ST81, No in the conditional branch in step ST84, and Yes in the conditional branch in step ST85, the first node is an “non-empty element”.
In the second node, No in the conditional branch in step ST81, No in the conditional branch in step ST84, No in the conditional branch in step ST85, and the second node is an “empty element”.
The third node is No in the conditional branch in step ST81, No in the conditional branch in step ST84, No in the conditional branch in step ST85, and the third node is an “non-empty element”.

4番目のノードでは、ステップST81の条件分岐でYes、ステップST82の条件分岐でYesとなり、4番目のノードは「属性」である。
5番目のノードでは、ビットがonであった場合は、ステップST81の条件分岐でYes、ステップST82の条件分岐でNo、ステップST83の条件分岐でYesとなり、5番目のノードは「属性のテキスト」である。また、ビットがoffであった場合、ステップST81の条件分岐でNo、ステップST84の条件分岐でYesとなり、「属性のテキスト」と判定される。
6番目のノードでは、ステップST81の条件分岐でYes、ステップST82の条件分岐でNo、ステップST83の条件分岐でNoとなり、6番目のノードは「要素のテキスト」である。
In the fourth node, the conditional branch in step ST81 is Yes, and in the conditional branch in step ST82, Yes, the fourth node is “attribute”.
In the fifth node, if the bit is on, the conditional branch in step ST81 is Yes, the conditional branch in step ST82 is No, the conditional branch in step ST83 is Yes, and the fifth node is “attribute text”. It is. If the bit is off, the condition branch of step ST81 is No, the condition branch of step ST84 is Yes, and it is determined as “attribute text”.
In the sixth node, Yes in the conditional branch in step ST81, No in the conditional branch in step ST82, No in the conditional branch in step ST83, and the sixth node is “element text”.

尚、以上説明したビット付与部32とノード種類復元部42以外の動作は実施の形態1と同様であるため、ここでの説明は省略する。   The operations other than the bit assigning unit 32 and the node type restoring unit 42 described above are the same as those in the first embodiment, and thus the description thereof is omitted here.

以上のように、実施の形態3のXMLデータ変換装置およびXMLデータ復元装置によれば、ビット付与部において、「属性のテキスト」でノード種類復元ビットのonとoffを混在させ、ノード種類復元部では、これらのビット値に基づいてノード種類を復元するようにしたので、この実施の形態3においても、実施の形態1と同様の効果が期待できる。   As described above, according to the XML data conversion device and the XML data restoration device of the third embodiment, the node type restoration unit mixes the node type restoration bit on and off in the “attribute text” in the bit assignment unit. Then, since the node type is restored based on these bit values, the same effect as in the first embodiment can be expected also in the third embodiment.

尚、上記実施の形態1、2において、ビット付与部32でのノード種類復元ビットon/offの付与の仕方を完全に逆にすることができる。また、実施の形態3において、「属性のテキスト」を除いたノードに対し、ビット付与部32でのノード種類復元ビットon/offの付与の仕方を完全に逆にすることもできる。   In the first and second embodiments, the method of assigning the node type restoration bit on / off in the bit assigning unit 32 can be completely reversed. Further, in the third embodiment, it is possible to completely reverse the method of giving the node type restoration bit on / off in the bit granting unit 32 to the nodes excluding “attribute text”.

実施の形態1においては、ビット付与部32は「属性」・「要素のテキスト」のノードに対してノード種類復元ビットoffを付与し、「空でない要素」・「空要素」・「属性のテキスト」のノードに対してノード種類復元ビットonを付与することもできる。この場合、図6のフローチャートの条件分岐ステップST61において、YesとNoが入れ替わる。   In the first embodiment, the bit assigning unit 32 assigns the node type restoration bit off to the nodes of “attribute” / “element text”, and “non-empty element” / “empty element” / “attribute text”. The node type restoration bit on can also be given to the node "." In this case, Yes and No are switched in the conditional branch step ST61 of the flowchart of FIG.

実施の形態2においては、ビット付与部32は「属性」・「要素のテキスト」・「属性のテキスト」のノードに対してノード種類復元ビットoffを付与し、「空でない要素」・「空要素」のノードに対してノード種類復元ビットonを付与することもできる。この場合、図7のフローチャートの条件分岐ステップST71において、YesとNoが入れ替わる。   In the second embodiment, the bit assigning unit 32 assigns the node type restoration bit off to the nodes of “attribute”, “element text”, and “attribute text”, and “non-empty element” / “empty element”. The node type restoration bit on can also be given to the node "." In this case, Yes and No are switched in the conditional branch step ST71 of the flowchart of FIG.

実施の形態3においては、ビット付与部32は「属性」・「要素のテキスト」のノードに対してノード種類復元ビットoffを付与し、「空でない要素」・「空要素」のノードに対してノード種類復元ビットonを付与することもできる。「属性のテキスト」のノードに対してはノード種類復元ビットonを付与してもよいし、ノード種類復元ビットoffを付与してもよい。この場合、図8のフローチャートの条件分岐ステップST81において、YesとNoが入れ替わる。   In the third embodiment, the bit assigning unit 32 assigns the node type restoration bit off to the nodes of “attribute” and “element text”, and to the nodes of “non-empty element” and “empty element”. A node type restoration bit on can also be given. A node type restoration bit on may be assigned to a node of “attribute text”, or a node type restoration bit off may be given. In this case, Yes and No are switched in the conditional branch step ST81 of the flowchart of FIG.

以上のようなノード種類復元ビットの付与であっても、実施の形態1と同様の効果が期待できる。   Even when the node type restoration bit is added as described above, the same effect as in the first embodiment can be expected.

実施の形態4.
実施の形態1〜3において、ノード深さ測定部33は、各ノードの深さの代わりに、各ノードの親ノードの登場順位を得てもよい。但し、自分のノードがルートノードで親ノードがない場合0を得る。また、この場合、自分のノードの親ノードが分かれば木構造復元部43で図5に示すような木構造を復元できる。
Embodiment 4 FIG.
In the first to third embodiments, the node depth measurement unit 33 may obtain the rank of appearance of the parent node of each node instead of the depth of each node. However, 0 is obtained when the own node is the root node and there is no parent node. In this case, if the parent node of the own node is known, the tree structure restoring unit 43 can restore the tree structure as shown in FIG.

実施の形態4におけるノード深さ測定部33の動作を、図2に示すXML文書を例に説明する。
aaaのノードでは、aaaが親ノードなので、ノード深さ測定部33は0を得る。
bbbのノードでは、親ノードaaaの登場順位が1番目なので、ノード深さ測定部33は1を得る。
cccのノードでは、親ノードaaaの登場順位が1番目なので、ノード深さ測定部33は1を得る。
dddのノードでは、親ノードcccの登場順位が3番目なので、ノード深さ測定部33は3を得る。
eeeのノードでは、親ノードdddの登場順位が4番目なので、ノード深さ測定部33は4を得る
fffのノードでは、親ノードcccの登場順位が3番目なので、ノード深さ測定部33は3を得る。
The operation of the node depth measurement unit 33 in the fourth embodiment will be described using the XML document shown in FIG. 2 as an example.
In the aaa node, since aaa is the parent node, the node depth measuring unit 33 obtains 0.
In the node of bbb, since the appearance rank of the parent node aaa is first, the node depth measurement unit 33 obtains 1.
In the ccc node, since the appearance rank of the parent node aaa is first, the node depth measurement unit 33 obtains 1.
In the node of ddd, since the appearance rank of the parent node ccc is third, the node depth measurement unit 33 obtains 3.
In the eee node, since the appearance rank of the parent node ddd is fourth, the node depth measurement unit 33 obtains 4.
In the node of fff, since the appearance rank of the parent node ccc is third, the node depth measurement unit 33 obtains 3.

また、木構造復元部43は、これらの値を各ノードの深さの代替として、各ノードの親ノードの登場順位から木構造を復元する。   Further, the tree structure restoration unit 43 restores the tree structure from the appearance order of the parent node of each node, using these values as alternatives to the depth of each node.

以上のように、実施の形態4のXMLデータ変換装置によれば、ノード深さ測定部は、各ノードの深さの代替として、各ノードの親ノードの登場順位を出力するようにし、また、XMLデータ復元装置によれば、木構造復元部は、各ノードの深さの代替として、各ノードの親ノードの登場順位から木構造を復元するようにしたので、実施の形態1と同様の効果が期待できる。   As described above, according to the XML data conversion apparatus of the fourth embodiment, the node depth measurement unit outputs the appearance rank of the parent node of each node as an alternative to the depth of each node, According to the XML data restoration device, the tree structure restoration unit restores the tree structure from the appearance order of the parent node of each node as an alternative to the depth of each node, and thus the same effect as in the first embodiment. Can be expected.

実施の形態5.
上記実施の形態1〜4では、ビット・深さ結合部34によってノードの種類とノード深さを結合してテーブルの2列目の数値を得ていたが、このような処理を行わず、ビット付与部32のビット値と、ノード深さの数値を3列のテーブルの値として用いるようにしてもよく、これを実施の形態5として説明する。
Embodiment 5. FIG.
In the first to fourth embodiments, the bit type and the node depth are combined by the bit / depth combining unit 34 to obtain the values in the second column of the table. The bit value of the assigning unit 32 and the numerical value of the node depth may be used as values in a table of three columns, which will be described as a fifth embodiment.

ここで、XMLデータ変換装置およびXMLデータ復元装置の構成は、図1において、ビット・深さ結合部34とビット・深さ分割部44がない以外は同様であるため、図1を援用して説明する。   Here, the configurations of the XML data conversion device and the XML data restoration device are the same as those in FIG. 1 except that the bit / depth combination unit 34 and the bit / depth division unit 44 are not provided. explain.

図9は、実施の形態5のXMLデータ変換装置によって作成されるテーブルの説明図である。
これは、図2に示したXML文書を変換部30によってテーブルデータに変換したもので、実施の形態1における図4のテーブルデータに対応するものである。ここで、1列目はノードの名称、2列目はビット付与部32によって付与されるビットのon/offを示し、3列目はノード深さ測定部33によって測定された各ノードの深さを示している。尚、図9において、4行目と6行目の「*」がビットのonを示している。
FIG. 9 is an explanatory diagram of a table created by the XML data conversion apparatus according to the fifth embodiment.
This is obtained by converting the XML document shown in FIG. 2 into table data by the conversion unit 30 and corresponds to the table data of FIG. 4 in the first embodiment. Here, the first column shows the name of the node, the second column shows the on / off of the bit given by the bit assigning unit 32, and the third column shows the depth of each node measured by the node depth measuring unit 33. Is shown. In FIG. 9, “*” in the fourth and sixth lines indicates the bit on.

また、復元部40の動作としては、木構造復元部43が、図9に示したテーブルデータの3列目の数値によって木構造を復元し、ノード種類復元部42は、2列目のビットのon/offによってノードの種類を復元する。尚、この場合のノードの種類を復元する動作は、実施の形態1と同様に行う。   Further, as the operation of the restoration unit 40, the tree structure restoration unit 43 restores the tree structure based on the values in the third column of the table data shown in FIG. 9, and the node type restoration unit 42 sets the bit in the second column. The node type is restored by on / off. The operation for restoring the node type in this case is performed in the same manner as in the first embodiment.

以上のように、実施の形態5のXMLデータ変換装置によれば、XMLデータを、XMLデータの各ノードの識別情報と、これに対応するノードの種類を示す値と、各ノードを木構造で表した場合のノード深さを示す数値とからなるテーブルデータに変換するXMLデータ変換装置であって、XMLデータから各ノードの識別情報を抽出するノード名称抽出部と、各ノードの種類に応じて予め決められた種類のノードに対してのみビットを付与し、各ノードに対してビットが付与されているか否かを表す値として出力するビット付与部と、各ノードを木構造で表した場合のノード深さに対応した数値を出力するノード深さ測定部とを備えたので、テーブルデータを生成するためにスキーマを必要とせず、また、元のXMLデータに復元できるような単一のテーブルデータに変換することができると共に、変換処理を簡素化することができる。 As described above, according to the XML data conversion apparatus of the fifth embodiment, the XML data is represented by the identification information of each node of the XML data, the value indicating the type of the corresponding node, and each node in a tree structure. An XML data conversion device for converting into table data composed of numerical values indicating node depths when represented, a node name extraction unit for extracting identification information of each node from XML data, and depending on the type of each node When a bit is assigned only to a predetermined type of node and output as a value indicating whether or not a bit is assigned to each node, and when each node is represented by a tree structure Since it has a node depth measurement unit that outputs a numerical value corresponding to the node depth, it does not require a schema to generate table data, and can be restored to the original XML data Una it is possible to convert a single table data, it is possible to simplify the conversion process.

また、実施の形態5のXMLデータ復元装置によれば、XMLデータの各ノードの識別情報とこれに対応するノードの種類を示す値と、各ノードを木構造で表した場合のノード深さを示す数値とからなるテーブルデータからXMLデータを復元するXMLデータ復元装置であって、ノード深さを示す数値に基づいて、XMLデータの木構造を復元する木構造復元部と、ノードの種類をビット付与の有無で示す値に基づいて、木構造で示された各ノードの種類を復元するノード種類復元部と、ノード種類復元部でその種類が復元された各ノードに対して識別情報を付与するノード名称付与部とを備えたので、各ノードの識別情報とこれに対応する数値とからなるテーブルデータからXMLデータを復元することができると共に、復元処理を簡素化することができる。
Further, according to the XML data restoration apparatus of the fifth embodiment, the identification information of each node of the XML data, the value indicating the type of the corresponding node, and the node depth when each node is represented by a tree structure An XML data restoration device for restoring XML data from table data consisting of a numerical value indicating a tree structure restoring unit for restoring a tree structure of XML data based on a numerical value indicating a node depth, and a bit of a node type Based on the value indicated by the presence / absence of assignment, a node type restoration unit that restores the type of each node indicated by the tree structure, and identification information is assigned to each node whose type has been restored by the node type restoration unit Since the node name assigning unit is provided, the XML data can be restored from the table data composed of the identification information of each node and the numerical value corresponding thereto, and the restoration process is simplified. It can be.

この発明の実施の形態1によるXMLデータ変換装置及びXMLデータ復元装置を示す構成図である。It is a block diagram which shows the XML data converter and XML data decompression | restoration apparatus by Embodiment 1 of this invention. XML文書の一例を示す説明図である。It is explanatory drawing which shows an example of an XML document. 図2に示すXML文書の木構造を示す説明図である。It is explanatory drawing which shows the tree structure of the XML document shown in FIG. 図2に示すXML文書を変換したテーブルの説明図である。It is explanatory drawing of the table which converted the XML document shown in FIG. 図4のテーブルから復元した木構造を示す説明図である。It is explanatory drawing which shows the tree structure decompress | restored from the table of FIG. 実施の形態1によるノード種類を決定するための動作を示すフローチャートである。6 is a flowchart illustrating an operation for determining a node type according to the first embodiment. 実施の形態2によるノード種類を決定するための動作を示すフローチャートである。10 is a flowchart illustrating an operation for determining a node type according to the second embodiment. 実施の形態3によるノード種類を決定するための動作を示すフローチャートである。12 is a flowchart illustrating an operation for determining a node type according to the third embodiment. 実施の形態5におけるテーブルの説明図である。FIG. 20 is an explanatory diagram of a table in the fifth embodiment.

符号の説明Explanation of symbols

10 XML文書格納部、20 テーブル格納部、30 変換部、31 ノード名称抽出部、32 ビット付与部、33 ノード深さ測定部、34 ビット・深さ結合部、40 復元部、41 ノード名称付与部、42 ノード種類復元部、43 木構造復元部、44 ビット・深さ分割部。   10 XML document storage section, 20 table storage section, 30 conversion section, 31 node name extraction section, 32 bit assignment section, 33 node depth measurement section, 34 bit / depth combination section, 40 restoration section, 41 node name assignment section 42 node type restoration unit, 43 tree structure restoration unit, 44 bit / depth division unit.

Claims (9)

XMLデータを、当該XMLデータの各ノードの識別情報とこれに対応する数値とからなるテーブルデータに変換するXMLデータ変換装置であって、
前記XMLデータから各ノードの識別情報を抽出するノード名称抽出部と、
前記各ノードの種類に応じて、予め決められた種類のノードに対してのみビットを付与し、それ以外の種類のノードに対してはビットを付与しないビット付与部と、
前記各ノードを木構造で表した場合のノード深さを測定するノード深さ測定部と、
前記ビット付与部で付与されたビット付与の有無と、前記ノード深さ測定部で測定されたノード深さに基づいて、当該ノード深さの測定値をn(nは2以上の任意の自然数)倍し、かつ、ビットが付与されている場合は1を加えた数値を生成し、当該数値を前記各ノードの識別情報に対応する数値として出力するビット・深さ結合部とを備えたXMLデータ変換装置。
An XML data conversion device that converts XML data into table data composed of identification information of each node of the XML data and a numerical value corresponding to the identification information,
A node name extraction unit that extracts identification information of each node from the XML data;
According to the type of each of the nodes, a bit granting unit that gives a bit only to a predetermined type of node and does not give a bit to other types of nodes ;
A node depth measurement unit for measuring a node depth when each node is represented by a tree structure;
Based on the presence / absence of bit assignment provided by the bit assignment unit and the node depth measured by the node depth measurement unit, the measured value of the node depth is n (n is an arbitrary natural number of 2 or more). XML data provided with a bit / depth combination unit that doubles and generates a numerical value to which 1 is added when a bit is added and outputs the numerical value as a numerical value corresponding to the identification information of each node Conversion device.
XMLデータを、当該XMLデータの各ノードの識別情報と、これに対応するノードの種類を示す値と、前記各ノードを木構造で表した場合のノード深さを示す数値とからなるテーブルデータに変換するXMLデータ変換装置であって、
前記XMLデータから各ノードの識別情報を抽出するノード名称抽出部と、
前記各ノードの種類に応じて予め決められた種類のノードに対してのみビットを付与し、各ノードに対してビットが付与されているか否かを前記ノードの種類を表す値として出力するビット付与部と、
前記各ノードを木構造で表した場合のノード深さに対応した数値を出力するノード深さ測定部とを備えたXMLデータ変換装置。
The XML data is converted into table data including identification information of each node of the XML data, a value indicating the type of the corresponding node, and a numerical value indicating the node depth when each node is represented by a tree structure. An XML data conversion device for converting,
A node name extraction unit that extracts identification information of each node from the XML data;
Bit assignment that assigns a bit only to a predetermined type of node according to the type of each node and outputs whether or not a bit is assigned to each node as a value representing the type of the node And
An XML data conversion device comprising: a node depth measuring unit that outputs a numerical value corresponding to a node depth when each node is represented by a tree structure.
ノードの種類は、空でない要素、空要素、属性、要素のテキスト、属性のテキストであることを特徴とする請求項1または請求項2記載のXMLデータ変換装置。 The XML data conversion apparatus according to claim 1 or 2 , wherein the node type is a non-empty element, an empty element, an attribute, an element text, or an attribute text. ノード深さ測定部は、各ノードの深さの代替として、各ノードの親ノードの登場順位を出力することを特徴とする請求項1から請求項のうちのいずれか1項記載のXMLデータ変換装置。 The XML data according to any one of claims 1 to 3 , wherein the node depth measurement unit outputs an appearance rank of a parent node of each node as an alternative to the depth of each node. Conversion device. XMLデータの各ノードの識別情報とこれに対応する数値とからなるテーブルデータからXMLデータを復元するXMLデータ復元装置であって、
前記各ノードに対応した数値から、ノードの種類をビット付与の有無で示す値と前記各ノードを木構造で表した場合のノード深さを示す値とを抽出するビット・深さ分割部と、
前記ビット・深さ分割部で抽出したノード深さを示す値に基づいて、XMLデータの木構造を復元する木構造復元部と、
前記ビット・深さ分割部で抽出したノードの種類をビット付与の有無で示す値に基づいて、前記木構造で示された各ノードの種類を復元するノード種類復元部と、
前記ノード種類復元部でその種類が復元された各ノードに対して前記識別情報を付与するノード名称付与部とを備えたXMLデータ復元装置。
An XML data restoration device for restoring XML data from table data comprising identification information of each node of XML data and a numerical value corresponding to the identification information,
A bit / depth dividing unit that extracts a value indicating the type of the node by the presence or absence of bit assignment and a value indicating the node depth when each node is represented by a tree structure, from a numerical value corresponding to each node;
A tree structure restoration unit for restoring the tree structure of the XML data based on the value indicating the node depth extracted by the bit / depth division unit;
A node type restoration unit that restores the type of each node indicated by the tree structure based on a value indicating whether or not a bit is provided with a node type extracted by the bit / depth division unit;
An XML data restoration apparatus comprising: a node name assigning unit that assigns the identification information to each node whose type is restored by the node type restoring unit.
ビット・深さ分割部は、各ノードの識別情報に対応した数値をn(nは2以上の任意の自然数)で割った余りをノードの種類を示すビット値、商を当該ノードの深さを示す値として抽出することを特徴とする請求項記載のXMLデータ復元装置。 The bit / depth dividing unit divides a numerical value corresponding to the identification information of each node by n (n is an arbitrary natural number of 2 or more), a bit value indicating the type of the node, and a quotient as the depth of the node. 6. The XML data restoration device according to claim 5 , wherein the XML data restoration device extracts the value as the indicated value. XMLデータの各ノードの識別情報とこれに対応するノードの種類を示す値と、前記各ノードを木構造で表した場合のノード深さを示す数値とからなるテーブルデータからXMLデータを復元するXMLデータ復元装置であって、
前記ノード深さを示す数値に基づいて、XMLデータの木構造を復元する木構造復元部と、
前記ノードの種類をビット付与の有無で示す値に基づいて、前記木構造で示された各ノードの種類を復元するノード種類復元部と、
前記ノード種類復元部でその種類が復元された各ノードに対して前記識別情報を付与するノード名称付与部とを備えたXMLデータ復元装置。
XML for restoring XML data from table data comprising identification information of each node of XML data, a value indicating the type of node corresponding to the node, and a numerical value indicating the node depth when each node is represented by a tree structure A data restoration device,
A tree structure restoration unit for restoring the tree structure of the XML data based on the numerical value indicating the node depth;
A node type restoration unit that restores the type of each node indicated by the tree structure based on a value indicating whether or not the node is provided with a bit ;
An XML data restoration apparatus comprising: a node name assigning unit that assigns the identification information to each node whose type is restored by the node type restoring unit.
ノードの種類は、空でない要素、空要素、属性、要素のテキスト、属性のテキストであることを特徴とする請求項から請求項のうちのいずれか1項記載のXMLデータ復元装置。 The node type, the element is not empty, an empty element, attributes, elements of text, XML data restoration device according to any one of claims 7 claim 5, which is a text attribute. 木構造復元部は、各ノードの深さの代替として、各ノードの親ノードの登場順位から木構造を復元することを特徴とする請求項から請求項のうちのいずれか1項記載のXMLデータ復元装置。 Tree structure restorer as an alternative to depth of each node, according to any one of claims 8 to restore the tree structure from claim 5, wherein the appearance order of the parent node of each node XML data restoration device.
JP2005313226A 2005-10-27 2005-10-27 XML data conversion device and XML data restoration device Active JP4675748B2 (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
JP2005313226A JP4675748B2 (en) 2005-10-27 2005-10-27 XML data conversion device and XML data restoration device

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
JP2005313226A JP4675748B2 (en) 2005-10-27 2005-10-27 XML data conversion device and XML data restoration device

Publications (2)

Publication Number Publication Date
JP2007122382A JP2007122382A (en) 2007-05-17
JP4675748B2 true JP4675748B2 (en) 2011-04-27

Family

ID=38146171

Family Applications (1)

Application Number Title Priority Date Filing Date
JP2005313226A Active JP4675748B2 (en) 2005-10-27 2005-10-27 XML data conversion device and XML data restoration device

Country Status (1)

Country Link
JP (1) JP4675748B2 (en)

Families Citing this family (1)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
JP5100220B2 (en) * 2007-06-29 2012-12-19 三菱電機株式会社 XML document conversion apparatus, XML document restoration apparatus, and XML document processing apparatus

Citations (3)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
JP2003271443A (en) * 2002-03-15 2003-09-26 Toshiba Corp Structured data storage system and method, structured data search system and method, and storage medium
JP2003345781A (en) * 2002-05-28 2003-12-05 Toshiba Corp Device and method for editing structuring data, and program
JP2005141650A (en) * 2003-11-10 2005-06-02 Seiko Epson Corp Structured document encoding device, structured document encoding method and program thereof

Patent Citations (3)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
JP2003271443A (en) * 2002-03-15 2003-09-26 Toshiba Corp Structured data storage system and method, structured data search system and method, and storage medium
JP2003345781A (en) * 2002-05-28 2003-12-05 Toshiba Corp Device and method for editing structuring data, and program
JP2005141650A (en) * 2003-11-10 2005-06-02 Seiko Epson Corp Structured document encoding device, structured document encoding method and program thereof

Also Published As

Publication number Publication date
JP2007122382A (en) 2007-05-17

Similar Documents

Publication Publication Date Title
US7260580B2 (en) Binary XML
US20100011016A1 (en) Dictionary compilations
JP2007156965A (en) Document processing method, program, and system
US7900143B2 (en) Large character set browser
JP4983100B2 (en) Data difference elimination program and data difference elimination apparatus
US7325189B2 (en) Web screen creation method, program and server
JPH10177613A (en) Method and device for generating and inputting url
JP2007041767A (en) Text mining device, method and program
JP4675748B2 (en) XML data conversion device and XML data restoration device
CN102193789B (en) Method and equipment for realizing configurable skip link
JP2019121165A (en) Retrieval result outputting program, retrieval result outputting apparatus, and retrieval result outputting method
JP2010282327A (en) Format conversion system, format conversion method, and program
JP4821287B2 (en) Structured document encoding method, encoding apparatus, encoding program, decoding apparatus, and encoded structured document data structure
JP2009015395A (en) Dictionary construction support device and dictionary construction support program
JP2012059212A (en) Extraction apparatus, extraction method and extraction program
JP5100220B2 (en) XML document conversion apparatus, XML document restoration apparatus, and XML document processing apparatus
JP2011154495A (en) Character code conversion device, character code conversion method and character code conversion program
JP2008097436A (en) Structured document structure automatic analysis and structure automatic reconstruction device
JP2002024233A (en) Recording medium with recorded dictionary data structure, dictionary consulting method, word and phrase acquiring method, dictionary consulting device, word and phrase acquiring device, and recording medium with recorded program
JP2007219579A (en) Document converter and program
JP4788241B2 (en) Document processing device
JP2006011549A (en) Structured document conversion device and program
KR100488805B1 (en) System for data processing of ASN.1 editor and method thereof
JP5619930B2 (en) Dialog script operation command execution device, dialog script operation command execution method, and program
JP4382634B2 (en) Address analysis apparatus, address analysis method, and address analysis program

Legal Events

Date Code Title Description
RD04 Notification of resignation of power of attorney

Free format text: JAPANESE INTERMEDIATE CODE: A7424

Effective date: 20071003

A621 Written request for application examination

Free format text: JAPANESE INTERMEDIATE CODE: A621

Effective date: 20080115

RD04 Notification of resignation of power of attorney

Free format text: JAPANESE INTERMEDIATE CODE: A7424

Effective date: 20080625

A977 Report on retrieval

Free format text: JAPANESE INTERMEDIATE CODE: A971007

Effective date: 20100813

A131 Notification of reasons for refusal

Free format text: JAPANESE INTERMEDIATE CODE: A131

Effective date: 20100824

A521 Request for written amendment filed

Free format text: JAPANESE INTERMEDIATE CODE: A523

Effective date: 20101014

TRDD Decision of grant or rejection written
A01 Written decision to grant a patent or to grant a registration (utility model)

Free format text: JAPANESE INTERMEDIATE CODE: A01

Effective date: 20110118

A01 Written decision to grant a patent or to grant a registration (utility model)

Free format text: JAPANESE INTERMEDIATE CODE: A01

A61 First payment of annual fees (during grant procedure)

Free format text: JAPANESE INTERMEDIATE CODE: A61

Effective date: 20110126

FPAY Renewal fee payment (event date is renewal date of database)

Free format text: PAYMENT UNTIL: 20140204

Year of fee payment: 3

R150 Certificate of patent or registration of utility model

Ref document number: 4675748

Country of ref document: JP

Free format text: JAPANESE INTERMEDIATE CODE: R150

Free format text: JAPANESE INTERMEDIATE CODE: R150

R250 Receipt of annual fees

Free format text: JAPANESE INTERMEDIATE CODE: R250

R250 Receipt of annual fees

Free format text: JAPANESE INTERMEDIATE CODE: R250

R250 Receipt of annual fees

Free format text: JAPANESE INTERMEDIATE CODE: R250

R250 Receipt of annual fees

Free format text: JAPANESE INTERMEDIATE CODE: R250

R250 Receipt of annual fees

Free format text: JAPANESE INTERMEDIATE CODE: R250

R250 Receipt of annual fees

Free format text: JAPANESE INTERMEDIATE CODE: R250

R250 Receipt of annual fees

Free format text: JAPANESE INTERMEDIATE CODE: R250

R250 Receipt of annual fees

Free format text: JAPANESE INTERMEDIATE CODE: R250

R250 Receipt of annual fees

Free format text: JAPANESE INTERMEDIATE CODE: R250