JP2001034513A - Method and device for data conversion, and storage medium storing data conversion program - Google Patents

Method and device for data conversion, and storage medium storing data conversion program

Info

Publication number
JP2001034513A
JP2001034513A JP11205459A JP20545999A JP2001034513A JP 2001034513 A JP2001034513 A JP 2001034513A JP 11205459 A JP11205459 A JP 11205459A JP 20545999 A JP20545999 A JP 20545999A JP 2001034513 A JP2001034513 A JP 2001034513A
Authority
JP
Japan
Prior art keywords
data
conversion method
tag
data conversion
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.)
Withdrawn
Application number
JP11205459A
Other languages
Japanese (ja)
Inventor
Makoto Takahashi
誠 高橋
Hideo Takahashi
英男 高橋
Keiichi Katsukura
桂一 勝倉
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.)
Hitachi Ltd
Original Assignee
Hitachi 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 Hitachi Ltd filed Critical Hitachi Ltd
Priority to JP11205459A priority Critical patent/JP2001034513A/en
Publication of JP2001034513A publication Critical patent/JP2001034513A/en
Withdrawn legal-status Critical Current

Links

Abstract

PROBLEM TO BE SOLVED: To make executable the data conversion processing regardless of the data item name or the element name of a data form of the converting destination by inputting the text data including the tag information and the data defined by the tag information and outputting the text data after converting them according to a data rule while referring to a data conversion rule that is previously made to correspond to the tag information according to the tag information. SOLUTION: A data conversion program 120 reads a tag name out of an extracted data transfer area 160, retrieves a table name made to correspond to the tag name in a mapping definition information area 170 and writes the table name into a table insertion data area 182. Then the program 120 produces the data which are stored in a table column to a pair of an attribute name and attribute value stored in the area 160. furthermore, the program 120 produces the data which are stored in a column to correspond to the text data existing between the opening and closing tags. In this example, 'PRODNAME' corresponds to the text data, is paired with 'refrigerator' and then is written.

Description

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

【0001】[0001]

【発明の属する技術分野】本発明は、XMLなどのタグ
付き言語で記述されたテキストデータをデータベースの
データ形式へ変換するデータ変換方法および装置並びに
データ変換プログラムを格納した記憶媒体に関する。
The present invention relates to a data conversion method and device for converting text data described in a tagged language such as XML into a data format of a database, and a storage medium storing a data conversion program.

【0002】[0002]

【従来の技術】現在、インターネットは世界的規模で普
及しており、電子メールの送受信やホームページの閲覧
手段としてだけでなく、企業間の電子商取引の手段とし
ても利用され始めている。インターネットには世界中の
企業が接続しているため、インターネット上での電子商
取引が実現できれば、新規顧客獲得や受注拡大等の機会
が劇的に増えると考えられている。
2. Description of the Related Art At present, the Internet has become widespread worldwide, and has begun to be used not only as a means for sending and receiving e-mails and for browsing home pages, but also as a means for e-commerce between companies. Since companies around the world are connected to the Internet, it is thought that if e-commerce can be realized on the Internet, opportunities for acquiring new customers and increasing orders will dramatically increase.

【0003】インターネット上での電子商取引を実現す
るには、各企業が受発注業務などを遂行するために構築
した情報システムの間で、電子商取引のための伝票デー
タを授受できなければならない。ところが、それぞれの
情報システムは、異なるメーカが提供する計算機システ
ムによって構成されており、伝票データの入出力のイン
タフェースは統一されていない。そのため、伝票データ
は異なるメーカの計算機システム間で授受できなければ
ならない。
In order to realize electronic commerce on the Internet, it is necessary for each company to be able to exchange slip data for electronic commerce between information systems constructed for performing ordering and other tasks. However, each information system is composed of computer systems provided by different manufacturers, and interfaces for inputting and outputting slip data are not unified. Therefore, slip data must be exchanged between computer systems of different manufacturers.

【0004】異なるメーカの計算機システム間でデータ
の授受を実現するには、中間形式としてテキストデータ
を用いると便利である。なぜならば、テキストデータは
一般のテキストエディタプログラムによる作成や内容の
確認が可能であるため、テキストデータを授受するプロ
グラムは、作成やテストが容易であり、開発コストを低
く抑えられるからである。
In order to realize the exchange of data between computer systems of different manufacturers, it is convenient to use text data as an intermediate format. This is because text data can be created and its contents can be confirmed by a general text editor program, so that a program for sending and receiving text data can be easily created and tested, and the development cost can be kept low.

【0005】従来、異なるメーカの計算機システム間で
データを授受するためのテキストファイルの書式とし
て、CSV(Comma Separated Valu
e)形式が使われてきた。CSV形式のファイルは特
に、異なるメーカのデータベース間のデータ授受に広く
用いられている。CSV形式のファイルを読み込んで、
データベースに格納する方法としては、例えば特開平1
0−143409において開示されている方法がある。
CSV形式を用いてデータベースのテーブルのデータを
表現した場合には、一つのファイルは一つのテーブルに
対応し、ファイルの一行は一レコード分のデータに対応
し、カンマで区切られた文字列がカラムに対応する。C
SV形式のファイルは、単一のテーブルに属する複数の
レコードのデータを一つのファイルに格納するため、デ
ータベースの1テーブルに格納されている全てのレコー
ドのデータを、他のデータベースのテーブルに転送する
場合などに便利である。しかしながら、注文1件分の伝
票データなどのように複数のテーブルに分けて格納すべ
きデータがひとまとまりになったデータの授受には、C
SV形式は適さない。複数のテーブルに格納すべき注文
1件分の伝票データを、CSV形式で表現しようとする
と、データを各テーブルに対応した複数のCSV形式の
ファイルに分けて格納する必要があり、不便であるため
である。
Conventionally, CSV (Comma Separated Value) has been used as a text file format for exchanging data between computer systems of different manufacturers.
e) format has been used. In particular, CSV format files are widely used for exchanging data between databases of different manufacturers. Read the file in CSV format,
As a method of storing in a database, for example,
There is a method disclosed in U.S. Pat.
When the data of the database table is represented using the CSV format, one file corresponds to one table, one line of the file corresponds to one record of data, and a character string separated by a comma is a column. Corresponding to C
In the SV format file, data of a plurality of records belonging to a single table is stored in one file. Therefore, data of all records stored in one table of a database is transferred to a table of another database. It is convenient for cases. However, in order to send and receive data that collectively stores data to be stored in a plurality of tables, such as slip data for one order, C
SV format is not suitable. In order to represent the slip data for one order to be stored in a plurality of tables in CSV format, it is necessary to store the data in a plurality of CSV format files corresponding to each table, which is inconvenient. It is.

【0006】複数のテーブルに分けて格納したいひとま
とまりのデータをテキストで表現する目的に適した書式
として、XML(eXtensible Markup
Language)などのマークアップ言語が注目され
ている。XMLは、SGML(Standard Ge
neralized Markup Language)
やHTML(Hyper Text Markup La
nguage)と同様、’<’と’>’で括られたタグ
を使ってデータの構造を表現する。XMLでは、記述す
るデータの種類に応じて使用するタグ名や属性名の一覧
であるタグセットを定める。授受したいデータの個々の
項目は、タグ間のテキストや属性の値として記述する。
An XML (extensible Markup) is used as a format suitable for expressing a set of data to be stored in a plurality of tables in text.
Attention is being paid to markup languages such as Language. XML is SGML (Standard Ge).
neutralized Markup Language)
And HTML (Hyper Text Markup La)
As in the case of the nuggage), the data structure is expressed by using tags enclosed by '<' and '>'. In XML, a tag set which is a list of tag names and attribute names to be used is determined according to the type of data to be described. Each item of data to be exchanged is described as text between tags or attribute values.

【0007】XML文書内のデータをデータベースに格
納するためには、XML文書の構造からデータの項目を
取り出して、データベースの所定のテーブルに格納する
XML文書格納プログラムが必要となる。そのようなX
ML文書格納プログラムを作成する方法として、日経B
P社刊「日経バイト」1999年1月号p.130に掲
載されている方法がある。この方法では、取り扱いたい
XMLのタグセットと格納先のテーブルに合わせて、X
ML文書格納プログラムを個別に作成する。作成された
XML文書格納プログラムは、特定のタグセットと格納
先テーブル構造専用のプログラムとなる。
In order to store data in an XML document in a database, an XML document storage program for extracting data items from the structure of the XML document and storing the data items in a predetermined table of the database is required. Such an X
As a method of creating an ML document storage program, Nikkei B
P. Nikkei Byte, January 1999, p. There are methods listed at 130. In this method, X is set according to the XML tag set to be handled and the storage destination table.
Create an ML document storage program individually. The created XML document storage program is a program dedicated to a specific tag set and a storage destination table structure.

【0008】[0008]

【発明が解決しようとする課題】しかしながら、上記の
従来技術には、以下の問題がある。すなわち、上記従来
技術では、タグセットと格納先のテーブルごとに専用の
XML文書格納プログラムを実装する必要があり、開発
コストが増大してしまうという問題がある。
However, the above prior art has the following problems. That is, in the above-described conventional technology, it is necessary to implement a dedicated XML document storage program for each tag set and each storage destination table, which causes a problem that the development cost increases.

【0009】本発明は、上記の問題点に鑑みて考案され
たものであり、上記課題を改善し、データ項目名や変換
先のデータ形式の要素名によらずに変換処理が可能な、
汎用のデータ変換方法および装置を提供することを目的
とする。
The present invention has been devised in view of the above-described problems, and solves the above-mentioned problems, and enables conversion processing regardless of the data item name or the element name of the data format of the conversion destination.
It is an object to provide a general-purpose data conversion method and apparatus.

【0010】[0010]

【課題を解決するための手段】上記の課題を解決するた
めに、本発明が提供するデータ変換方法は、テキストデ
ータからデータを抽出して出力するデータ変換方法であ
って、一つのタグ名と、任意の個数の属性名と属性値の
対とを有する文字列であるタグと、タグ以外のテキスト
データであるプレーンテキストデータとを有するテキス
トデータであるタグ付きテキストデータを第一の入力と
し、該タグ付きテキストデータと出力データとの間の変
換規則を指定した定義情報であるマッピング定義情報を
第二の入力とし、該マッピング定義情報の指定に従っ
て、該タグ付きテキストデータから変換処理の対象とな
るデータである処理対象データを取り出す処理である処
理対象データ取得処理を実行し、該処理対象データを該
マッピング定義情報の指定に従って出力する処理である
処理対象データ出力処理を実行し、該処理対象データ出
力処理では、該処理対象データを識別する情報である処
理対象データ識別情報と、該処理対象データそのものと
を出力するようにしている。
In order to solve the above-mentioned problems, a data conversion method provided by the present invention is a data conversion method for extracting and outputting data from text data. A tag that is a character string having an arbitrary number of attribute name and attribute value pairs, and tagged text data that is text data having plain text data that is non-tag text data as a first input, Mapping definition information, which is definition information that specifies a conversion rule between the tagged text data and the output data, is used as a second input, and the conversion target is converted from the tagged text data according to the specification of the mapping definition information. Processing target data acquisition processing, which is processing for retrieving processing target data that is the data to be processed, and converting the processing target data into the mapping definition information A process target data output process, which is a process of outputting according to the specification, is executed. In the process target data output process, process target data identification information that is information for identifying the process target data and the process target data itself are output. Like that.

【0011】[0011]

【発明の実施の形態】《第一の実施例》以下に本発明の
一実施例を、図面を用いて詳細に説明する。
DESCRIPTION OF THE PREFERRED EMBODIMENTS First Embodiment An embodiment of the present invention will be described below in detail with reference to the drawings.

【0012】本発明では、上記課題を解決するデータ変
換方法として、機能の異なる複数のデータ変換方法を提
供している。第一の実施例では、そのうちの第一のデー
タ変換方法を説明する。
The present invention provides a plurality of data conversion methods having different functions as data conversion methods for solving the above-mentioned problems. In the first embodiment, a first data conversion method will be described.

【0013】第一のデータ変換方法の目的は、変換元と
なるXML文書の構造と、変換先となるデータベースの
テーブルとの対応関係さえ定義すれば、変換処理が可能
なデータ変換方法を提供することである。
An object of the first data conversion method is to provide a data conversion method capable of performing a conversion process only by defining the correspondence between the structure of an XML document as a conversion source and a table of a database as a conversion destination. That is.

【0014】本発明が提供するデータ変換方法は、汎用
の計算機上のプログラムであるXML文書格納プログラ
ムとして実現している。本発明によれば、ユーザは、X
ML文書格納プログラムが参照する定義情報であるマッ
ピング定義情報さえ用意すれば、専用のXML文書格納
プログラムを作成しなくてもXML文書内のデータをデ
ータベースのテーブルのレコードに変換できる。
The data conversion method provided by the present invention is realized as an XML document storage program which is a program on a general-purpose computer. According to the present invention, the user has X
If only the mapping definition information, which is the definition information referred to by the ML document storage program, is prepared, the data in the XML document can be converted into a record in the database table without creating a dedicated XML document storage program.

【0015】まず、図1を用いて、本発明が提供するデ
ータ変換方法を実装したプログラムであるXML文書格
納プログラム100が動作する計算機10のシステム構
成を説明する。
First, a system configuration of a computer 10 on which an XML document storage program 100, which is a program implementing a data conversion method provided by the present invention, operates will be described with reference to FIG.

【0016】図1において、計算機10はネットワーク
17と、ディスク装置16に接続されている。計算機1
0はその構成要素として、プログラムとデータ領域を格
納する主記憶装置11と、演算処理を行うCPU12
と、ネットワーク17との通信処理を行う通信インタフ
ェース13と、ディスク装置16を制御するディスクイ
ンタフェース14と、以上の要素を接続するバス15か
ら構成される。
In FIG. 1, the computer 10 is connected to a network 17 and a disk device 16. Calculator 1
0 is a main storage device for storing programs and data areas, and a CPU 12 for performing arithmetic processing.
, A communication interface 13 for performing communication processing with the network 17, a disk interface 14 for controlling the disk device 16, and a bus 15 for connecting the above elements.

【0017】主記憶装置11上にあるXML文書格納プ
ログラム100の入力となるXML文書200は、ネッ
トワーク17経由(60)、またはディスク装置16か
ら読み込む(62)。また、XML文書格納プログラム
100は、出力としてディスク装置16上のテーブル4
10にレコードを挿入する(64)。
An XML document 200, which is an input of the XML document storage program 100 in the main storage device 11, is read via the network 17 (60) or from the disk device 16 (62). Further, the XML document storage program 100 outputs the table 4 on the disk device 16 as an output.
A record is inserted into 10 (64).

【0018】主記憶装置11は、その構成要素として、
受発注処理を一例とする業務処理を実行し、その処理の
一部分としてXML文書格納プログラム100を利用す
る業務プログラム140と、業務プログラム140から
起動され、XML文書200を入力してテーブル410
にレコードを挿入する処理全体を制御するXML文書格
納プログラム100と、XML文書格納プログラム10
0から呼ばれるサブルーチンであるデータ抽出プログラ
ム110と、データ変換プログラム120およびデータ
出力プログラム130とを有する。さらに、作業用のデ
ータ領域であるパラメタ受け渡し領域150と、抽出デ
ータ受け渡し領域160、および出力データ受け渡し領
域180と、定義情報用のデータ領域であるマッピング
定義情報領域170とを有する。
The main storage device 11 has the following components:
A business process is executed by taking the order document process as an example, and a business program 140 that uses the XML document storage program 100 as a part of the process, and an XML document 200 that is started by the business program 140 and receives a table 410
Document storage program 100 for controlling the entire process of inserting a record into XML document, and XML document storage program 10
It has a data extraction program 110 which is a subroutine called from 0, a data conversion program 120 and a data output program 130. Further, it has a parameter transfer area 150 which is a work data area, an extracted data transfer area 160, an output data transfer area 180, and a mapping definition information area 170 which is a data area for definition information.

【0019】次に、主記憶装置11上のそれぞれのサブ
ルーチンについて説明する。データ抽出プログラム11
0は、入力となるXML文書の構文解析を行うサブルー
チンである。データ抽出プログラム110は、XML文
書200を入力として構文解析を行い、タグや属性など
の構文要素を検出し、検出し個々の構文要素について、
そのタグ名、属性名、属性値、タグ以外のテキスト、な
どの文字列データである構文データを抽出する。抽出し
た構文データは、抽出データ受け渡し領域160に格納
する。データ抽出プログラム110は、通信インタフェ
ース13経由(61)やディスクインタフェース14経
由(63)でXML文書200を入力する。
Next, each subroutine on the main storage device 11 will be described. Data extraction program 11
Reference numeral 0 denotes a subroutine for parsing an input XML document. The data extraction program 110 performs syntax analysis using the XML document 200 as an input, detects syntax elements such as tags and attributes, and detects and detects each syntax element.
Syntax data, which is character string data such as the tag name, attribute name, attribute value, and text other than the tag, is extracted. The extracted syntax data is stored in the extracted data transfer area 160. The data extraction program 110 inputs the XML document 200 via the communication interface 13 (61) or the disk interface 14 (63).

【0020】データ変換プログラム120は、XML文
書内のデータを元にテーブルに挿入するデータを作成す
るサブルーチンである。データ変換プログラム120
は、抽出データ受け渡し領域160に格納された構文デ
ータを入力とし、マッピング定義情報領域170に格納
されたマッピング定義情報に従って、テーブルなどに格
納すべきデータであるテーブル挿入データを作成し、作
成したテーブル挿入データを出力データ受け渡し領域1
80に出力する。
The data conversion program 120 is a subroutine for creating data to be inserted into a table based on data in an XML document. Data conversion program 120
Creates the table insertion data, which is the data to be stored in a table or the like, according to the mapping definition information stored in the mapping definition information area 170, using the syntax data stored in the extracted data transfer area 160 as an input. Output data transfer area 1 for inserting data
Output to 80.

【0021】データ出力プログラム130は、変換済み
のデータを出力するサブルーチンである。本実施例にお
いては、変換済みのデータの出力先の一例として、デー
タベースのテーブルを取り上げている。データ出力プロ
グラム130は、データ変換プログラム120が作成し
たテーブル挿入データを、データベースのテーブルなど
のデータ構造に格納するサブルーチンである。本実施例
においては、データ出力プログラム130は、出力デー
タ受け渡し領域180に格納されたテーブル挿入データ
に従って、テーブル410を始めとするテーブルにレコ
ードを挿入する。データ出力プログラム130は、他の
データ構造やプログラムに変換済みデータを出力するプ
ログラムで置き換えてもよい。
The data output program 130 is a subroutine for outputting converted data. In the present embodiment, a database table is taken as an example of an output destination of converted data. The data output program 130 is a subroutine that stores the table insertion data created by the data conversion program 120 in a data structure such as a database table. In this embodiment, the data output program 130 inserts a record into a table such as the table 410 according to the table insertion data stored in the output data transfer area 180. The data output program 130 may be replaced with a program that outputs converted data to another data structure or program.

【0022】次に、主記憶装置11上のそれぞれのデー
タ領域について説明する。
Next, each data area on the main storage device 11 will be described.

【0023】パラメタ受け渡し領域150は、業務プロ
グラム140とXML文書格納プログラム100との間
で受け渡しされるパラメタを格納する作業領域である。
The parameter transfer area 150 is a work area for storing parameters transferred between the business program 140 and the XML document storage program 100.

【0024】抽出データ受け渡し領域160は、XML
文書から抽出された構文データを格納する作業領域であ
り、データ抽出プログラム110が書き込み、データ変
換プログラム120が参照する。
The extracted data transfer area 160 is an XML
A work area for storing syntax data extracted from a document, which is written by the data extraction program 110 and referenced by the data conversion program 120.

【0025】マッピング定義情報領域170は、XML
文書の構文要素とテーブルの構成要素との対応関係の定
義情報であるマッピング定義情報を格納したデータ領域
であり、XML文書格納プログラム100の起動に先立
って事前に設定されており、データ変換プログラム12
0が参照する。
The mapping definition information area 170 contains XML
A data area that stores mapping definition information that is definition information of the correspondence between the syntax elements of the document and the components of the table. The data area is set in advance prior to the start of the XML document storage program 100.
0 refers.

【0026】出力データ受け渡し領域180は、テーブ
ル挿入データを格納する作業用のデータ領域であり、デ
ータ変換プログラム120が書き込み、データ出力プロ
グラム130が参照する。
The output data transfer area 180 is a work data area for storing table insertion data, written by the data conversion program 120 and referenced by the data output program 130.

【0027】計算機10は、以上で説明したように構成
されている。
The computer 10 is configured as described above.

【0028】ディスク装置16は、テーブル410を始
めとする一連のテーブルを格納するテーブル格納領域4
00を有する。さらに、ディスク装置16はXML文書
200を格納してもよい。
The disk device 16 has a table storage area 4 for storing a series of tables including a table 410.
00. Further, the disk device 16 may store the XML document 200.

【0029】次に、一連のプログラムの動作の流れにつ
いて説明する。あらかじめ起動されている業務プログラ
ム140が、入力となるXML文書200の所在をパラ
メタ受け渡し領域150に格納して、XML文書格納プ
ログラム100を起動すると、XML文書格納プログラ
ム100は、3つのサブルーチンである、データ抽出プ
ログラム110、データ変換プログラム120、データ
出力プログラム130を順次起動する。データ抽出プロ
グラム110は、所在が指定されたXML文書200を
入力として読み込み、構文解析を行い、その結果である
構文データを抽出データ受け渡し領域160に格納す
る。次に、データ変換プログラム120は、その構文デ
ータを入力として、マッピング定義情報格納領域170
に格納されたマッピング定義情報に従って、テーブル挿
入データを作成し、出力データ受け渡し領域180に格
納する。最後に、データ出力プログラム130は、その
テーブル挿入データを入力とし、テーブル格納領域40
0上のテーブル410にレコードを挿入する。
Next, the operation flow of a series of programs will be described. When the business program 140 started in advance stores the location of the input XML document 200 in the parameter transfer area 150 and starts the XML document storage program 100, the XML document storage program 100 is composed of three subroutines. The data extraction program 110, the data conversion program 120, and the data output program 130 are sequentially activated. The data extraction program 110 reads the XML document 200 whose location is specified as an input, performs syntax analysis, and stores the syntax data as a result in the extracted data transfer area 160. Next, the data conversion program 120 receives the syntax data as an input, and
The table insertion data is created in accordance with the mapping definition information stored in the output data transfer area 180. Finally, the data output program 130 receives the table insertion data as input, and
0, a record is inserted into the table 410.

【0030】以上の一連の動作によりXML文書200
に含まれていたデータがテーブル410のレコードとし
て格納される。
With the above series of operations, the XML document 200
Is stored as a record in the table 410.

【0031】次に、図2を用いてXML文書格納プログ
ラム100の処理内容を説明する。図2は、XML文書
格納プログラム100の処理手順を示したPAD図であ
る。
Next, the processing content of the XML document storage program 100 will be described with reference to FIG. FIG. 2 is a PAD showing a processing procedure of the XML document storage program 100.

【0032】XML文書格納プログラム100は、ま
ず、データ抽出プログラム110を起動して、XML文
書200の構文要素を検出し、検出した構文要素の構文
データを抽出データ受け渡し領域160に格納させる
(101)。次に、データ変換プログラム120を起動
して、抽出データ受け渡し領域160から構文データを
読み込み、マッピング定義情報領域170に格納されて
いるマッピング定義情報に基づきテーブル挿入データを
作成し、出力データ受け渡し領域140に格納させる
(102)。最後に、データ出力プログラム130を起
動し、出力データ受け渡し領域180からテーブル挿入
データを読み込み、テーブル410にレコードを挿入す
る(103)。
First, the XML document storage program 100 activates the data extraction program 110 to detect a syntax element of the XML document 200, and stores the syntax data of the detected syntax element in the extracted data transfer area 160 (101). . Next, the data conversion program 120 is started, syntax data is read from the extracted data transfer area 160, table insertion data is created based on the mapping definition information stored in the mapping definition information area 170, and the output data transfer area 140 is created. (102). Finally, the data output program 130 is started, the table insertion data is read from the output data transfer area 180, and a record is inserted into the table 410 (103).

【0033】以上の手順によれば、XML文書の読み込
みからテーブルのレコード挿入までの一連の処理が実行
される。
According to the above procedure, a series of processes from reading an XML document to inserting records in a table are executed.

【0034】次に、図3を用いてデータ変換プログラム
120の処理手順について説明する。本実施例において
は、データ変換プログラム120は、本発明が提供する
複数のデータ変換方法のうち、第一のデータ変換方法を
実装している。
Next, the processing procedure of the data conversion program 120 will be described with reference to FIG. In this embodiment, the data conversion program 120 implements a first data conversion method among a plurality of data conversion methods provided by the present invention.

【0035】図3は、第一のデータ変換方法の原理図で
ある。
FIG. 3 shows the principle of the first data conversion method.

【0036】第一のデータ変換方法は、タグ名に基づい
てテーブル名を決定し、属性名に基づいてカラム名を決
定する点に特徴がある。
The first data conversion method is characterized in that a table name is determined based on a tag name and a column name is determined based on an attribute name.

【0037】データ変換プログラム120は、以下の手
順に従って、抽出データ受け渡し領域160に格納され
た構文データから、出力データ受け渡し領域180上の
テーブル挿入データ領域182にテーブル挿入データを
格納する。
The data conversion program 120 stores the table insertion data in the table insertion data area 182 on the output data transfer area 180 from the syntax data stored in the extracted data transfer area 160 according to the following procedure.

【0038】まず、データ変換プログラム120は、抽
出データ受け渡し領域160からタグ名を読み出し、マ
ッピング定義情報領域170内でそのタグ名に対応づけ
られたテーブル名を検索して、検索されたテーブル名を
テーブル挿入データ領域182に書き込む。図3におい
ては、“注文明細”というタグ名に対して“ORDER
ITEM”というテーブル名が対応づけられている(1
000)ので、テーブル挿入データ領域182上のテー
ブル名領域402に“ORDERITEM”を書き込ん
でいる(1004)。
First, the data conversion program 120 reads a tag name from the extracted data transfer area 160, searches the mapping definition information area 170 for a table name corresponding to the tag name, and searches for the table name. Write to the table insertion data area 182. In FIG. 3, “ORDER” is added to the tag name “order details”.
The table name “ITEM” is associated (1
000), “ORDERITEM” is written in the table name area 402 on the table insertion data area 182 (1004).

【0039】次に、抽出データ受け渡し領域160に格
納された属性名と属性値の組に対して、テーブルのカラ
ムに格納すべきデータを作成する。図3においては、
“注文番号”という属性名に対して“ORDERID”
というカラム名が対応づけられており(1001)、そ
の属性値が“O501001”なので、カラム名領域4
03にカラム名“ORDERID”を、カラム値領域4
04に属性値の“O501001”を組にして書き込ん
でいる(1005)。同様に、“個数”という属性名に
対して“AMOUNT”というカラム名が対応づけられ
ており(1002)、その属性値は“10”なので、カ
ラム名領域403にカラム名“AMOUNT”を、カラ
ム値領域404に属性値の“10”を組にして書き込ん
でいる(1006)。
Next, data to be stored in the columns of the table is created for the set of the attribute name and the attribute value stored in the extracted data transfer area 160. In FIG.
"ORDERID" for attribute name "order number"
(1001) and the attribute value is “O501001”, the column name area 4
03 and the column name “ORDERID” in the column value area 4
04 and the attribute value “O501001” is written as a set (1005). Similarly, the column name “AMOUNT” is associated with the attribute name “NUMBER” (1002), and the attribute value is “10”. The attribute value "10" is written as a group in the value area 404 (1006).

【0040】次に、開きタグと閉じタグの間のテキスト
データに対応して、カラムに格納すべきデータを作成す
る。図3においては、“注文明細”というタグの開きタ
グと閉じタグの間のテキストデータに対して “PRO
DNAME”というカラム名が対応づけられており(1
003)、該当個所の構文データとして“電気冷蔵庫”
という文字列が格納されているので、カラム名領域40
3にカラム名“PRODNAME”を、カラム値領域4
04に構文データの“電気冷蔵庫”を組にして書き込ん
でいる(1007)。テーブル挿入データ領域182に
格納された上記のデータは、データ変換プログラム12
0に続いて起動されるデータ出力プログラム130によ
ってテーブル410に挿入される。図3のデータ例であ
れば、ORDERITEMテーブルに“ORDERI
D”、“AMOUNT”、“PRODNAME”の各カ
ラムの値が“O501001”、“10”、“電気冷蔵
庫”であるようなレコードが挿入される。
Next, data to be stored in the column is created corresponding to the text data between the opening tag and the closing tag. In FIG. 3, the text data between the opening and closing tags of the tag “Order Details” is “PRO
The column name “DNAME” is associated with (1
003), "Electric refrigerator" as the syntax data of the corresponding location
Is stored in the column name area 40
3 is assigned the column name “PRODNAME” and the column value area 4
04 is written as a set of syntax data “electric refrigerator” (1007). The above data stored in the table insertion data area 182 is
0 is inserted into the table 410 by the data output program 130 started after 0. In the case of the data example of FIG. 3, "ORDERI" is stored in the ORDERITEM table.
A record in which the values of the columns “D”, “AMOUNT”, and “PRODNAME” are “O501001”, “10”, and “electric refrigerator” is inserted.

【0041】以上が、第一のデータ変換方法の処理手順
である。上記の手順によれば、マッピング定義情報領域
170に格納されている定義の内容次第で、任意のタグ
名や属性名を持ったXML文書内のデータを、任意のテ
ーブル名やカラム名を持ったテーブルに格納することが
可能である。すなわち、上記の手順によれば、ユーザ
は、XML文書格納プログラムが参照するマッピング定
義情報さえ用意すれば、専用のXML文書格納プログラ
ムを作成しなくてもXML文書内のデータをデータベー
スのテーブルのレコードに変換することが可能となり、
第一のデータ変換方法の目的は達せられる。
The above is the processing procedure of the first data conversion method. According to the above procedure, depending on the contents of the definition stored in the mapping definition information area 170, data in an XML document having an arbitrary tag name or attribute name can be replaced with an arbitrary table name or column name. It can be stored in a table. That is, according to the above procedure, if the user prepares only the mapping definition information to be referred to by the XML document storage program, the data in the XML document can be stored in the record of the database table without creating a dedicated XML document storage program. Can be converted to
The purpose of the first data conversion method is achieved.

【0042】《第二の実施例》次に、第二の実施例につ
いて説明する。
<< Second Embodiment >> Next, a second embodiment will be described.

【0043】第二の実施例では、本発明が提供する複数
のデータ変換方法のうち、第二のデータ変換方法を説明
する。
In the second embodiment, of the plurality of data conversion methods provided by the present invention, the second data conversion method will be described.

【0044】第二のデータ変換方法の目的は、XML文
書内の構文データに対するデータ形式変換処理の種類を
指定できるようにすることである。これが実現できれ
ば、XML文書としての伝票データにおいて、例えば金
額を表現する際に、カンマ付き整数のような書式でデー
タを記述しておき、それをテーブルの整数型のカラムに
格納するような場合のようなデータ形式の変換処理を指
定することが可能となる。
The purpose of the second data conversion method is to be able to specify the type of data format conversion processing for syntax data in an XML document. If this can be realized, for example, when expressing the amount of money in the slip data as an XML document, the data is described in a format such as an integer with a comma, and the data is stored in the integer type column of the table. It is possible to specify such a data format conversion process.

【0045】本実施例においては、第二のデータ変換方
法を、第一の実施例と同じ構成の計算機システムで動作
するプログラムとして実現している。第一の実施例と本
実施例の相違点は、データ変換プログラムに対するマッ
ピング定義情報の与えかたと、データ変換プログラムの
処理手順のみである。以下では、これらの相違点につい
て説明する。
In the present embodiment, the second data conversion method is implemented as a program that operates on a computer system having the same configuration as that of the first embodiment. The only difference between the first embodiment and the present embodiment lies in the way in which the mapping definition information is provided to the data conversion program and the processing procedure of the data conversion program. Hereinafter, these differences will be described.

【0046】第二のデータ変換方法では、XML文書内
の構文要素に対応づけて、構文データに対して適用する
データ形式変換処理の種類の指定をあらかじめマッピン
グ定義情報領域170に格納し、指定された種類のデー
タ形式変換処理によって構文データの形式からテーブル
に格納するデータの形式へ変換する点に特徴がある。
In the second data conversion method, the specification of the type of data format conversion processing to be applied to the syntax data is stored in advance in the mapping definition information area 170 in association with the syntax element in the XML document. It is characterized in that the format is converted from the syntax data format to the data format to be stored in the table by the data format conversion processing of the following types.

【0047】以下では、図4を用いて、第二のデータ変
換方法の処理手順について説明する。
The processing procedure of the second data conversion method will be described below with reference to FIG.

【0048】図4は、第二のデータ変換方法の動作原理
図である。
FIG. 4 is an operation principle diagram of the second data conversion method.

【0049】本実施においては、データ変換プログラム
120が実装する第二のデータ変換方法は、第一のデー
タ変換方法での処理内容に加えて、構文要素に対応して
データ形式の変換処理を指定できるようになっている点
に特徴がある。
In the present embodiment, the second data conversion method implemented by the data conversion program 120 specifies a data format conversion process corresponding to a syntax element in addition to the processing contents of the first data conversion method. The feature is that it can be done.

【0050】データ変換プログラム120は、以下の手
順に従って、抽出データ受け渡し領域160に格納され
た構文データから、出力データ受け渡し領域180上に
テーブル挿入データ領域182にデータを格納する。
The data conversion program 120 stores data in the table insertion data area 182 on the output data transfer area 180 from the syntax data stored in the extracted data transfer area 160 according to the following procedure.

【0051】まず、データ変換プログラム120は、抽
出データ受け渡し領域160からタグ名を読み出し、マ
ッピング定義情報内でそのタグ名に対応づけられたテー
ブル名を検索して、検索されたテーブル名をテーブル挿
入データ領域182上のテーブル名領域402に書き込
む。図4においては、“注文明細”というタグ名に対し
て“ORDERITEM”というテーブル名が対応づけ
られている(2000)ので、テーブル挿入データ領域
182上のテーブル名領域402に“ORDERITE
M”を書き込んでいる(2005)。
First, the data conversion program 120 reads a tag name from the extracted data transfer area 160, searches the mapping definition information for a table name corresponding to the tag name, and inserts the searched table name into the table. Write to the table name area 402 on the data area 182. In FIG. 4, since the table name “ORDERITEM” is associated with the tag name “order details” (2000), “ORDERITE” is added to the table name area 402 on the table insertion data area 182.
M "is written (2005).

【0052】次に、抽出データ受け渡し領域160に格
納された属性名と属性値の組、ならびに開きタグと閉じ
タグの間のテキストデータに対して、テーブルのカラム
に格納すべきデータを作成する。その際に、データ形式
変換処理が指定されている場合には、指定されたデータ
形式変換処理を実行する。図4においては、“注文番
号”と“品番”という二つの属性名に対しては、特にデ
ータ形式変換処理は指定されておらず、第一の実施例と
同様に、属性名と属性値に対応したデータをカラム名領
域403とカラム値領域404にデータを格納している
(2001、2002、2006、2007)。ところ
が、“金額”という属性名に対しては、カラム名として
“PRICE”が対応づけられていることに加えて(2
003)、データ形式変換処理の種類として“カンマ付
き整数”が指定されている(2004)。そこで、その
指定に従い、属性値の“1,000”をカンマ付き整数
とみなして整数に変換し、カラム名領域403にカラム
名“PRICE”を、カラム値領域404に変換済みの
値である“1000”を組にして書き込んでいる(20
08)。
Next, data to be stored in the columns of the table is created for the set of the attribute name and the attribute value stored in the extracted data transfer area 160 and the text data between the open tag and the close tag. At this time, if the data format conversion process is specified, the specified data format conversion process is executed. In FIG. 4, data format conversion processing is not specified for the two attribute names “order number” and “part number”, and the attribute names and the attribute values are similar to those in the first embodiment. The corresponding data is stored in the column name area 403 and the column value area 404 (2001, 2002, 2006, 2007). However, for the attribute name “money”, “PRICE” is associated as a column name, and (2)
003), “integer with comma” is specified as the type of data format conversion processing (2004). Therefore, according to the specification, the attribute value “1,000” is regarded as an integer with a comma, and is converted into an integer. The column name “PRICE” is stored in the column name area 403, and the converted value “ 1000 "as a set (20
08).

【0053】以上が、第二のデータ変換方法の処理手順
である。上記の手順によれば、マッピング定義情報領域
170上で、構文要素に対応づけてデータ形式変換処理
の種類を格納しておけば、任意の入力書式を持ったXM
L文書の中のデータを、かかるデータ形式変換処理に基
づいて適切に形式変換し、変換した結果を任意のテーブ
ル名やカラム名を持ったテーブルに格納することが可能
である。すなわち、上記の手順によれば、第二のデータ
変換方法の目的は達せられる。
The above is the processing procedure of the second data conversion method. According to the above procedure, if the type of the data format conversion process is stored in the mapping definition information area 170 in association with the syntax element, the XM having an arbitrary input format is stored.
The data in the L document can be appropriately converted in format based on the data format conversion process, and the converted result can be stored in a table having an arbitrary table name or column name. That is, according to the above procedure, the purpose of the second data conversion method is achieved.

【0054】《第三の実施例》次に、第三の実施例につ
いて説明する。
Third Embodiment Next, a third embodiment will be described.

【0055】第三の実施例では、本発明が提供する複数
のデータ変換方法のうち、第三のデータ変換方法を説明
する。
In the third embodiment, a third data conversion method among a plurality of data conversion methods provided by the present invention will be described.

【0056】第三のデータ変換方法の目的は、次の二点
である。
The purpose of the third data conversion method is the following two points.

【0057】第一の目的は、テーブルに格納するデータ
として、XML文書内の構文データ以外にも、入力パラ
メタとして業務プログラムから渡したデータを指定でき
るようにすることである。これが実現できれば、XML
文書を登録した時刻などの、XML文書自体には記述さ
れてはいないが、業務設計上格納しておきたいデータを
テーブルに格納することが可能になる。
A first object is to allow, as data to be stored in a table, data passed from a business program as an input parameter in addition to syntax data in an XML document. If this can be realized, XML
Although it is not described in the XML document itself, such as the time at which the document was registered, it is possible to store data that should be stored in the business design in the table.

【0058】第二の目的は、XML文書に記述されてい
たデータを格納する先として、テーブル以外にも、業務
プログラムに返す出力パラメタを指定できるようにする
ことである。これが実現できれば、XML文書内に記述
されていたデータのうち、文書の作成者などの、テーブ
ルに格納するだけではなく業務プログラムにおいても画
面表示などの用途に使いたいデータを、業務プログラム
に渡すことが可能になる。
A second object is to enable, in addition to a table, an output parameter to be returned to a business program to be specified as a storage destination of data described in an XML document. If this can be realized, of the data described in the XML document, the data such as the creator of the document that is desired to be used not only for storing in the table but also for displaying the screen in the business program should be passed to the business program. Becomes possible.

【0059】本実施例においては、第三のデータ変換方
法を、第一の実施例と同じ構成の計算機システムで動作
するプログラムとして実現している。第一の実施例と本
実施例の相違点は、データ変換プログラム120に対す
るマッピング定義情報の与えかたと、データ変換プログ
ラム120の処理手順、および、パラメタ受け渡し領域
150に格納されるデータの三点である。
In the present embodiment, the third data conversion method is realized as a program that operates on a computer system having the same configuration as that of the first embodiment. The difference between the first embodiment and the present embodiment is that the mapping definition information is given to the data conversion program 120, the processing procedure of the data conversion program 120, and the data stored in the parameter transfer area 150. is there.

【0060】以下では、これらの相違点について説明
し、第一の実施例と同じ点については説明を省略する。
In the following, these differences will be described, and description of the same points as in the first embodiment will be omitted.

【0061】以下では、図5を用いて、第三のデータ変
換方法の処理手順について説明する。
Hereinafter, the processing procedure of the third data conversion method will be described with reference to FIG.

【0062】図5は、第三のデータ変換方法の動作原理
図である。
FIG. 5 is an operation principle diagram of the third data conversion method.

【0063】図5において、パラメタ受け渡し領域15
0には、業務プログラム140からXML文書格納プロ
グラムに渡される入力パラメタを格納する領域である入
力パラメタ領域152と、XML文書格納プログラムか
ら業務プログラム140に渡す出力パラメタを格納する
パラメタ出力領域151とを設けてある。
In FIG. 5, the parameter transfer area 15
0, an input parameter area 152 that stores input parameters passed from the business program 140 to the XML document storage program, and a parameter output area 151 that stores output parameters passed from the XML document storage program to the business program 140. It is provided.

【0064】第三のデータ変換方法には、二つの特徴が
ある。
The third data conversion method has two features.

【0065】第一の特徴は、XML文書内に記述されて
いたデータである構文データ以外にも、パラメタ入力領
域152に格納されているデータをテーブルに格納でき
る点である。パラメタ入力領域152上のデータは、業
務プログラム140がXML文書格納プログラムを起動
する前に値を設定しておくものとする。これにより、第
三のデータ変換方法の第一の目的が達せられる。
A first feature is that data stored in the parameter input area 152 can be stored in a table in addition to syntax data which is data described in an XML document. The data in the parameter input area 152 is set to a value before the business program 140 activates the XML document storage program. This achieves the first purpose of the third data conversion method.

【0066】第二の特徴は、抽出データ受け渡し領域1
60から取り出した構文データを、テーブル挿入データ
領域182以外にも、パラメタ出力領域151へデータ
を出力できる点である。これにより、第三のデータ変換
方法の第二の目的が達せられる。
The second feature is that the extracted data transfer area 1
The point is that the syntax data extracted from 60 can be output to the parameter output area 151 in addition to the table insertion data area 182. Thereby, the second object of the third data conversion method is achieved.

【0067】本実施例では、上記二つの特徴を同時に実
現した実装例を示すが、両者は独立に実現でき、いずれ
か一方のみを実現することも可能である。
In the present embodiment, an example of implementation in which the above two features are realized at the same time is shown. However, both can be realized independently, and only one of them can be realized.

【0068】本実施例においては、データ変換プログラ
ム120は、上記の特徴を持つ第三のデータ変換方法を
実装しており、以下の手順に従って、抽出データ受け渡
し領域160に格納された構文データと、パラメタ入力
領域152に格納されたパラメタを入力として、テーブ
ル挿入データ領域182と、パラメタ出力領域151に
データを出力する。
In the present embodiment, the data conversion program 120 implements the third data conversion method having the above-described features. According to the following procedure, the syntax data stored in the extracted data transfer area 160 With the parameters stored in the parameter input area 152 as input, data is output to the table insertion data area 182 and the parameter output area 151.

【0069】データ変換プログラム120は、まず、第
一のデータ変換方法と同様に、マッピング定義情報領域
170に格納された指定に従って、タグ名や属性名、属
性値に対応したデータをテーブル挿入データ182に格
納する(3001、3002)。
First, in the same manner as in the first data conversion method, the data conversion program 120 converts the data corresponding to the tag name, the attribute name, and the attribute value into the table insertion data 182 according to the specification stored in the mapping definition information area 170. (3001, 3002).

【0070】次に、マッピング定義情報領域170の指
定に従い、カラム値領域404の指定された要素を、パ
ラメタ出力領域151に書き込む。図5においては、
“ORDERID”カラムに対するカラム値を、パラメ
タ出力領域151に書き込んでいる(3003)。
Next, the specified element of the column value area 404 is written to the parameter output area 151 in accordance with the specification of the mapping definition information area 170. In FIG.
The column value for the “ORDERID” column is written in the parameter output area 151 (3003).

【0071】次に、マッピング定義情報領域170上の
指定に従い、パラメタ入力領域152の内容を、指定さ
れたカラム名と対応づけてカラム名領域403とカラム
値領域404に書き込む。図5においては、指定された
カラム名が“DATE”であり、パラメタ入力領域15
2の内容が“1999−07−19”なので、カラム名
領域403にカラム名“DATE”を、カラム値領域4
04にパラメタ入力領域152の内容“1999−07
−19”を組にして書き込んでいる(3004)。
Next, in accordance with the specification in the mapping definition information area 170, the contents of the parameter input area 152 are written in the column name area 403 and the column value area 404 in association with the specified column name. In FIG. 5, the designated column name is “DATE” and the parameter input area 15
2 is “1999-07-19”, the column name “DATE” is stored in the column name area 403 and the column value area 4
04, the contents of the parameter input area 152 "1999-07
-19 "is written as a set (3004).

【0072】以上が、第三のデータ変換方法の処理手順
である。上記の手順によれば、テーブルに格納するデー
タとして、XML文書内に記述されたデータ以外にも、
入力パラメタとして業務プログラムから渡したデータを
指定できるようにすることが可能となる。また、XML
文書に記述されていたデータを格納する先として、テー
ブル以外にも、業務プログラムに返す出力パラメタを指
定できるようにすることが可能となる。すなわち、上記
の手順によれば、第三のデータ変換方法の二つの目的は
達せられる。
The above is the processing procedure of the third data conversion method. According to the above procedure, as data to be stored in the table, in addition to the data described in the XML document,
It is possible to specify data passed from a business program as an input parameter. Also, XML
As a destination for storing the data described in the document, it is possible to specify an output parameter to be returned to the business program in addition to the table. That is, according to the above procedure, the two objects of the third data conversion method are achieved.

【0073】《第四の実施例》次に、第四の実施例につ
いて説明する。
Fourth Embodiment Next, a fourth embodiment will be described.

【0074】第四の実施例では、本発明が提供する複数
のデータ変換方法のうち、第四のデータ変換方法を説明
する。
In the fourth embodiment, a fourth data conversion method among a plurality of data conversion methods provided by the present invention will be described.

【0075】第四のデータ変換方法の目的は、テーブル
に格納するデータとして、XML文書内の構文データを
そのまま用いるのではなく、ユーザが用意したプログラ
ムに構文データを一旦渡して、そのプログラムの中で任
意の変換処理を施し、その結果得られる値をテーブルに
格納できるようにすることである。これが実現できれ
ば、業務プログラムに固有の特殊なデータ形式変換や、
データベースに格納するレコードのキーカラムのための
自動採番処理などを実行するユーザプログラムを利用す
ることが可能になる。
The purpose of the fourth data conversion method is not to use syntax data in an XML document as it is as data to be stored in a table, but to pass the syntax data to a program prepared by a user once, To perform an arbitrary conversion process and store the resulting value in a table. If this can be realized, special data format conversion specific to business programs,
It is possible to use a user program that executes automatic numbering processing for key columns of records stored in the database.

【0076】本実施例においては、第四のデータ変換方
法を、第一の実施例と同じ構成の計算機システムで動作
するプログラムとして実現している。第一の実施例と本
実施例の相違点は、データ変換プログラムに対するマッ
ピング定義情報の与えかたと、データ変換プログラムの
処理手順、および、パラメタ受け渡し領域に格納される
データの三点である。
In the present embodiment, the fourth data conversion method is implemented as a program that operates on a computer system having the same configuration as that of the first embodiment. The first embodiment differs from the present embodiment in three points, namely, how to provide mapping definition information for a data conversion program, the processing procedure of the data conversion program, and data stored in a parameter transfer area.

【0077】以下では、これらの相違点について説明
し、第一の実施例と同じ点については説明を省略する。
In the following, these differences will be described, and description of the same points as in the first embodiment will be omitted.

【0078】以下では、図6を用いて、第四のデータ変
換方法の処理手順について説明する。
Hereinafter, the processing procedure of the fourth data conversion method will be described with reference to FIG.

【0079】図6は、第四のデータ変換方法の動作原理
図である。
FIG. 6 is an operation principle diagram of the fourth data conversion method.

【0080】図6において、業務プログラム140を構
成する要素の一つとして、ユーザコールバックプログラ
ム500を設けてある。ユーザコールバックプログラム
500は、データ変換プログラム120が呼び出すサブ
ルーチンであり、業務プログラム140の一部としてユ
ーザが用意する。カウンタ501は、ユーザコールバッ
クプログラム500が利用する変数の一例である。
In FIG. 6, a user callback program 500 is provided as one of the components constituting the business program 140. The user callback program 500 is a subroutine called by the data conversion program 120, and is prepared by the user as a part of the business program 140. The counter 501 is an example of a variable used by the user callback program 500.

【0081】本実施例では、パラメタ受け渡し領域15
0には、ユーザコールバックプログラム500を呼び出
す時の入力パラメタを格納するコールバック入力パラメ
タ領域153と、ユーザコールバックプログラム500
から返される出力パラメタを格納するコールバック出力
パラメタ領域154とを設けてある。
In this embodiment, the parameter transfer area 15
0 is a callback input parameter area 153 for storing input parameters for calling the user callback program 500;
And a callback output parameter area 154 for storing the output parameters returned from.

【0082】第四のデータ変換方法では、上記の目的を
達成するために、データ変換プログラム120の中か
ら、ユーザが用意したサブルーチンであるユーザコール
バックプログラム500を呼び出せるようにしてある。
さらに、マッピング定義情報の構成要素として、ユーザ
コールバックプログラム500へ渡すべき入力パラメタ
であるコールバック入力パラメタの指定と、ユーザコー
ルバックプログラム500から返される出力パラメタで
あるコールバック出力パラメタの格納先の指定を追加し
ているを特徴としている。
In the fourth data conversion method, a user callback program 500 which is a subroutine prepared by the user can be called from the data conversion program 120 in order to achieve the above object.
Further, as the components of the mapping definition information, the specification of the callback input parameter, which is the input parameter to be passed to the user callback program 500, and the storage destination of the callback output parameter, which is the output parameter returned from the user callback program 500, The feature is that the designation is added.

【0083】コールバック入力パラメタに渡すべき構文
データの指定は、抽出データ受け渡し領域160に格納
された複数の構文データのうちの該当要素を特定できる
形式であればどのような形式でもよい。例えば、ユーザ
に属性名を指定させて、その属性名に対応する属性値を
入力パラメタとして渡させることが可能である。
The syntax data to be passed to the callback input parameter can be specified in any format as long as the corresponding element can be specified from among the plurality of syntax data stored in the extracted data transfer area 160. For example, it is possible to have a user specify an attribute name and pass an attribute value corresponding to the attribute name as an input parameter.

【0084】コールバック出力パラメタの格納先の指定
としては、テーブル挿入データ領域182上のカラム名
領域403に渡すべきカラム名を用いることができる。
As the designation of the storage destination of the callback output parameter, a column name to be passed to the column name area 403 on the table insertion data area 182 can be used.

【0085】コールバック入力パラメタ、コールバック
出力パラメタ共に、その個数はいくつでもよい。
Any number of callback input parameters and callback output parameters may be used.

【0086】図6においては、ユーザコールバックプロ
グラム500で実行する処理の一例として、自動的な採
番処理の例を示している。すなわち、ユーザコールバッ
クプログラム500は、採番のためのカウンタ501を
管理し、呼び出されるたびにカウンタの値を増やし、コ
ールバック入力パラメタとして渡されたデータにカウン
タの値を連接した文字列を出力している。
FIG. 6 shows an example of an automatic numbering process as an example of a process executed by the user callback program 500. That is, the user callback program 500 manages the counter 501 for numbering, increases the value of the counter each time it is called, and outputs a character string in which the value of the counter is connected to the data passed as the callback input parameter. are doing.

【0087】本実施例において、データ変換プログラム
120は、上記の特徴を持つ第四のデータ変換方法を実
装しており、以下の手順に従って、抽出データ受け渡し
領域160に格納された構文データを元に、テーブル挿
入データ領域182にデータを出力する。
In the present embodiment, the data conversion program 120 implements the fourth data conversion method having the above-described features, and performs the following procedure based on the syntax data stored in the extracted data transfer area 160. , And outputs data to the table insertion data area 182.

【0088】データ変換プログラム120は、まず、第
一のデータ変換方法と同様に、マッピング定義情報領域
170に格納された指定に従って、タグ名や属性名、属
性値に対応した構文データをテーブル挿入データ領域1
82に格納する(4001、4002,4003)。
First, similarly to the first data conversion method, the data conversion program 120 converts syntax data corresponding to tag names, attribute names, and attribute values into the table insertion data according to the specification stored in the mapping definition information area 170. Area 1
82 (4001, 4002, 4003).

【0089】次に、コールバック入力パラメタとして渡
すべき構文データを、マッピング定義情報領域170に
格納された指定に従って抽出データ受け渡し領域160
から読み出し、コールバック入力パラメタ領域153に
格納する(4004)。図6においては、構文データの
一例として“O501”という文字列を格納している。
Next, the syntax data to be passed as the callback input parameter is stored in the extraction data transfer area 160 according to the specification stored in the mapping definition information area 170.
And stored in the callback input parameter area 153 (4004). In FIG. 6, a character string “O501” is stored as an example of the syntax data.

【0090】次に、ユーザコールバックプログラム50
0を起動し、コールバック入力パラメタ領域153のデ
ータを入力としてユーザが用意した処理を実行させ(4
005)、その処理結果をコールバック出力パラメタ領
域154に格納させる(4006)。図6においては、
ユーザコールバックプログラム500が実行する処理の
例として、入力された文字列“O501”の後に、ハイ
フンと、カウンタ501が保持する通番“131”を連
接した文字列“O501−131”を出力している。
Next, the user callback program 50
0 and activates the process prepared by the user with the data of the callback input parameter area 153 as input (4).
005), and stores the processing result in the callback output parameter area 154 (4006). In FIG.
As an example of processing executed by the user callback program 500, a character string "O501-131" in which a hyphen and a serial number "131" held by the counter 501 are output after the input character string "O501" is output. I have.

【0091】次に、コールバック出力パラメタ領域15
4に格納された値を、マッピング定義情報領域170に
格納された指定に従って、テーブル挿入データ領域18
2に格納する。図6においては、コールバック出力パラ
メタ領域154の値は“O501−131”であり、マ
ッピング定義情報領域170上で指定されたカラム名は
“SEQ”なので、カラム名領域403にカラム名“S
EQ”を、カラム値領域404にコールバック出力パラ
メタ領域154の値“O501−131”を組にして書
き込んでいる(4007)。
Next, the callback output parameter area 15
4 in the table insertion data area 18 according to the specification stored in the mapping definition information area 170.
2 is stored. In FIG. 6, the value of the callback output parameter area 154 is “O501-131”, and the column name specified on the mapping definition information area 170 is “SEQ”.
“EQ” is written in the column value area 404 as a set of the value “O501-131” of the callback output parameter area 154 (4007).

【0092】以上が、第四のデータ変換方法の処理手順
である。上記の手順によれば、テーブルに格納するデー
タとして、XML文書内に記述されたデータをそのまま
格納するのではなく、ユーザが用意したプログラムに一
旦渡して、そのプログラムの中で任意の変換処理を施し
た後の値を格納することが可能である。すなわち、上記
の手順によれば、第四のデータ変換方法の目的は達せら
れる。
The above is the processing procedure of the fourth data conversion method. According to the above procedure, data described in an XML document is not directly stored as data to be stored in a table, but is passed once to a program prepared by a user, and arbitrary conversion processing is performed in the program. It is possible to store the value after application. That is, according to the above procedure, the object of the fourth data conversion method is achieved.

【0093】《第五の実施例》次に、第五の実施例につ
いて説明する。
<< Fifth Embodiment >> Next, a fifth embodiment will be described.

【0094】第五の実施例では、本発明が提供する複数
のデータ変換方法のうち、第五のデータ変換方法を説明
する。
In the fifth embodiment, of the plurality of data conversion methods provided by the present invention, the fifth data conversion method will be described.

【0095】第五のデータ変換方法の目的は、タグ名と
属性名および属性値の組で、格納先となるデータベース
のテーブル名を決定できるようにすることである。これ
が実現できれば、XML文書の中で使用するタグの種類
を増やさずに、すでに定義されているタグ名をそのまま
用いて、タグの属性値の違いで格納先のテーブルの種類
を追加することが可能となる。
The purpose of the fifth data conversion method is to be able to determine a table name of a database to be stored in a set of a tag name, an attribute name, and an attribute value. If this can be realized, it is possible to add the type of the table of the storage destination by the difference of the attribute value of the tag, without increasing the type of tag used in the XML document, using the already defined tag name as it is Becomes

【0096】本実施例においては、第五のデータ変換方
法を、第一の実施例と同じ構成の計算機システムで動作
するプログラムとして実現している。第五の実施例と本
実施例の相違点は、データ変換プログラムに対するマッ
ピング定義情報の与えかたと、データ変換プログラムの
処理手順のみである。
In the present embodiment, the fifth data conversion method is realized as a program that operates on a computer system having the same configuration as in the first embodiment. The fifth embodiment is different from the fifth embodiment only in the way of providing mapping definition information to the data conversion program and in the processing procedure of the data conversion program.

【0097】以下では、これらの相違点について説明
し、第一の実施例と同じ点については説明を省略する。
In the following, these differences will be described, and description of the same points as in the first embodiment will be omitted.

【0098】以下では、図7を用いて、第五のデータ変
換方法の処理手順について説明する。
In the following, the processing procedure of the fifth data conversion method will be described with reference to FIG.

【0099】図7は、第五のデータ変換方法の動作原理
図である。
FIG. 7 is an operation principle diagram of the fifth data conversion method.

【0100】本実施例において、データ変換プログラム
120は、第四のデータ変換方法を実装しており、以下
の手順に従って、抽出データ受け渡し領域160に格納
された構文データを元に、テーブル挿入データ領域18
2にデータを出力する。
In the present embodiment, the data conversion program 120 implements the fourth data conversion method, and, based on the syntax data stored in the extracted data transfer area 160, according to the following procedure, 18
2 to output the data.

【0101】データ変換プログラム120は、まず、抽
出データ受け渡し領域160からタグ名と属性名および
属性値の組を読み出し、マッピング定義情報内でそのタ
グ名と属性名および属性値に対応づけられたテーブル名
を検索して、検索されたテーブル名をテーブル挿入デー
タ領域182に書き込む。図7においては、“注文伝
票”というタグ名と“顧客種別”という属性名および
“法人”という属性値の組に対して“CO_ORDE
R”というテーブル名が対応づけられている(500
0)ので、テーブル挿入データ領域182上のテーブル
名領域402に“CO_ORDER”を書き込んでいる
(5003)。
The data conversion program 120 first reads a set of a tag name, an attribute name, and an attribute value from the extracted data transfer area 160, and sets a table corresponding to the tag name, the attribute name, and the attribute value in the mapping definition information. A name is searched, and the searched table name is written in the table insertion data area 182. In FIG. 7, “CO_ORDE” is assigned to a set of a tag name “order slip”, an attribute name “customer type”, and an attribute value “corporation”.
R "is associated with the table name (500
0), “CO_ORDER” is written in the table name area 402 on the table insertion data area 182 (5003).

【0102】次に、抽出データ受け渡し領域160に格
納された属性名と属性値の組に対して、テーブルのカラ
ムに格納すべきデータを作成する。図7においては、
“会社コード”という属性名に対して“CUSTCOD
E”というカラム名が対応づけられており(500
1)、その属性値が“1234”なので、カラム名領域
403に“CUSTCODE”を、カラム値領域404
に属性値の“1234”を組にして書き込んでいる(5
004)。同様に、“会社名”という属性名に対して
“CUSTNAME”というカラム名が対応づけられて
おり(5002)、その属性値は“A社”なので、カラ
ム名領域403にカラム名“CUSTNAME”を、カ
ラム値領域404に属性値の“A社”を組にして書き込
んでいる(5005)。
Next, data to be stored in the columns of the table is created for the pair of the attribute name and the attribute value stored in the extracted data transfer area 160. In FIG.
“CUSTCOD” for the attribute name “Company code”
E ”is associated with the column name (500
1) Since the attribute value is “1234”, “CUSTCODE” is set in the column name area 403 and the column value area 404
Is written with the attribute value "1234" as a set (5
004). Similarly, the column name “CUSTNAME” is associated with the attribute name “Company name” (5002), and the attribute value is “Company A”, so the column name “CUSTNAME” is added to the column name area 403. The attribute value “company A” is written in the column value area 404 as a set (5005).

【0103】以上が、第五のデータ変換方法の処理手順
である。上記の手順によれば、マッピング定義情報領域
170内に、タグ名と属性名および属性値の組に対応づ
けてテーブル名を格納しておけば、XML文書の中で使
用するタグの種類を増やさずに、すでに定義されている
タグ名をそのまま用いて、タグの属性値の違いで格納先
のテーブルの種類を追加することが可能である。すなわ
ち、上記の手順によれば、第五のデータ変換方法の目的
は達せられる。
The above is the processing procedure of the fifth data conversion method. According to the above procedure, if table names are stored in the mapping definition information area 170 in association with sets of tag names, attribute names, and attribute values, the types of tags used in the XML document can be increased. Instead, it is possible to use the already defined tag name as it is and add the type of the storage destination table depending on the attribute value of the tag. That is, according to the above procedure, the object of the fifth data conversion method is achieved.

【0104】《第六の実施例》次に第六の実施例につい
て説明する。
<< Sixth Embodiment >> Next, a sixth embodiment will be described.

【0105】第六の実施例では、本発明が提供する複数
のデータ変換方法のうち、第六のデータ変換方法を説明
する。
In the sixth embodiment, of the plurality of data conversion methods provided by the present invention, the sixth data conversion method will be described.

【0106】第六のデータ変換方法の目的は、テーブル
の一つのレコードに格納する値を、XML文書内の単一
のタグのみから取得することに加えて、基準となる単一
のタグから指定された相対的な位置関係にある別のタグ
からも取得できるようにすることである。これが実現で
きれば、基準となるタグから見て「一段外側のタグ」の
ような相対位置指定で特定できるタグの属性値を、所定
のテーブルの所定のカラムに格納することが可能とな
る。
The purpose of the sixth data conversion method is to obtain a value to be stored in one record of a table from only a single tag in an XML document and to specify a value from a single tag as a reference. That is, it can be obtained from another tag having a relative positional relationship. If this can be realized, it becomes possible to store, in a predetermined column of a predetermined table, an attribute value of a tag that can be specified by specifying a relative position such as “tag one step outside” when viewed from a reference tag.

【0107】本実施例においては、第六のデータ変換方
法を、第一の実施例と同じ構成の計算機システムで動作
するプログラムとして実現している。第一の実施例と本
実施例の相違点は、データ変換プログラムに対するマッ
ピング定義情報の与えかたと、データ変換プログラムの
処理手順のみである。
In the present embodiment, the sixth data conversion method is realized as a program that operates on a computer system having the same configuration as in the first embodiment. The only difference between the first embodiment and the present embodiment lies in the way in which the mapping definition information is provided to the data conversion program and the processing procedure of the data conversion program.

【0108】以下では、これらの相違点について説明
し、第一の実施例と同じ点については説明を省略する。
In the following, these differences will be described, and description of the same points as in the first embodiment will be omitted.

【0109】以下では、図8を用いて、第六のデータ変
換方法の処理手順について説明する。
Hereinafter, the processing procedure of the sixth data conversion method will be described with reference to FIG.

【0110】図8は、第六のデータ変換方法の動作原理
図である。
FIG. 8 is an operation principle diagram of the sixth data conversion method.

【0111】第六のデータ変換方法では、マッピング定
義情報領域170に格納する構文要素とカラムの対応づ
けの指定において、レコードに格納しようとするタグを
起点として、指定した相対位置にある別のタグ上の構文
要素を指定できることに特徴がある。
In the sixth data conversion method, in specifying the association between the syntax element stored in the mapping definition information area 170 and the column, another tag located at the specified relative position with the tag to be stored in the record as the starting point The feature is that the above syntax element can be specified.

【0112】本実施例において、データ変換プログラム
120は、上記の特徴を持つ第六のデータ変換方法を実
装しており、以下の手順に従って、抽出データ受け渡し
領域160に格納された構文データから、出力データ受
け渡し領域180上にテーブル挿入データ領域182に
データを格納する。
In the present embodiment, the data conversion program 120 implements the sixth data conversion method having the above-described characteristics, and outputs the data from the syntax data stored in the extracted data transfer area 160 according to the following procedure. Data is stored in the table insertion data area 182 on the data transfer area 180.

【0113】データ変換プログラム120は、まず、第
一のデータ変換方法と同様に、マッピング定義情報領域
170に格納された指定に従って、タグ名や属性名、属
性値に対応した構文データをテーブル挿入データ領域1
82に格納する(6000、6001、6002、60
04、6005、6006)。
The data conversion program 120 firstly, according to the specification stored in the mapping definition information area 170, converts the syntax data corresponding to the tag name, attribute name, and attribute value into the table insertion data, as in the first data conversion method. Area 1
82 (6000, 6001, 6002, 60
04, 6005, 6006).

【0114】次に、カラムに格納すべき構文データとし
て、基準となるタグから指定された相対位置にある別の
タグ上の構文データを取得することがマッピング定義情
報領域170上で指定されている場合には、その指定に
基づいて指定された構文データを取得して、テーブル挿
入データ領域182に対応するデータを格納する。図8
においては、“注文明細”タグに対応するレコードを
“ORDERITEM”テーブルに挿入する処理の一部
として、“CUSTNAME”カラムに格納すべき構文
データは、基準となるタグである“注文明細”から見
て、一段外側のタグである“注文伝票”タグ(600
8)の、“会社名”属性から取得するように指定されて
いる(6003)。そこで、かかる“会社名”属性の値
である“A社”という構文データを“CUSTNAM
E”というカラム名と対応づけて、カラム名領域403
とカラム値領域404に組にして追加している(600
7)。
Next, as syntax data to be stored in a column, acquisition of syntax data on another tag at a specified relative position from a reference tag is specified in the mapping definition information area 170. In this case, the specified syntax data is obtained based on the specified data, and the data corresponding to the table insertion data area 182 is stored. FIG.
In, as part of the process of inserting the record corresponding to the “order detail” tag into the “ORDERITEM” table, the syntax data to be stored in the “CUSTNAME” column is viewed from the reference order “order detail”. The "order slip" tag (600
8), it is specified to be acquired from the “company name” attribute (6003). Therefore, the syntax data “Company A”, which is the value of the “Company Name” attribute, is added to “CUSTNAM”.
The column name area 403 is associated with the column name “E”.
And added to the column value area 404 (600
7).

【0115】以上が、第六のデータ変換方法の処理手順
である。上記の手順によれば、マッピング定義情報領域
170内に、タグ名と相対位置指定および属性名の組に
対応づけてカラム名を格納しておけば、相対位置指定で
検索されたタグの属性値を任意のテーブル名やカラム名
を持ったテーブルに格納することが可能である。すなわ
ち、上記の手順によれば、第六のデータ変換方法の目的
は達せられる。
The above is the processing procedure of the sixth data conversion method. According to the above procedure, if the column name is stored in the mapping definition information area 170 in association with the combination of the tag name and the relative position specification and the attribute name, the attribute value of the tag searched by the relative position specification Can be stored in a table having an arbitrary table name or column name. That is, according to the above procedure, the purpose of the sixth data conversion method is achieved.

【0116】《第七の実施例》次に、第七の実施例につ
いて説明する。
<< Seventh Embodiment >> Next, a seventh embodiment will be described.

【0117】第七の実施例では、本発明が提供する複数
のデータ変換方法のうち、第七のデータ変換方法を説明
する。
In the seventh embodiment, of the plurality of data conversion methods provided by the present invention, the seventh data conversion method will be described.

【0118】第七のデータ変換方法の目的は、同一のタ
グが連続して登場する場合に、かかるタグの通番を指定
されたカラムに格納できるようにすることである。これ
が実現できれば、XML文書内にタグの通番が記述され
ていなくても、自動的に採番されたタグの通番を、所定
のテーブルの所定のカラムへの格納やユーザプログラム
への受け渡しなどに利用することが可能となる。
The purpose of the seventh data conversion method is to allow the serial number of such a tag to be stored in a designated column when the same tag appears successively. If this can be realized, even if the serial number of the tag is not described in the XML document, the serial number of the automatically assigned tag is used for storage in a predetermined column of a predetermined table or delivery to a user program, and the like. It is possible to do.

【0119】本実施例においては、第七のデータ変換方
法を、第一の実施例と同じ構成の計算機システムで動作
するプログラムとして実現している。第一の実施例と本
実施例の相違点は、データ変換プログラムに対するマッ
ピング定義情報の与えかたと、データ変換プログラムの
処理手順のみである。
In the present embodiment, the seventh data conversion method is realized as a program that operates on a computer system having the same configuration as that of the first embodiment. The only difference between the first embodiment and the present embodiment lies in the way in which the mapping definition information is provided to the data conversion program and the processing procedure of the data conversion program.

【0120】以下では、これらの相違点について説明
し、第一の実施例と同じ点については説明を省略する。
In the following, these differences will be described, and description of the same points as in the first embodiment will be omitted.

【0121】図9は、第七のデータ変換方法の動作原理
図である。
FIG. 9 is an operation principle diagram of the seventh data conversion method.

【0122】図9において、データ変換プログラム12
0は、抽出データ受け渡し領域160からタグ名を取り
出す際に、タグの通番を自動的に採番している(60
0)。本実施例において、データ変換プログラム120
は、上記の特徴を持つ第七のデータ変換方法を実装して
おり、以下の手順に従って、抽出データ受け渡し領域1
60に格納された構文データを元に、テーブル挿入デー
タ領域182にデータを出力する。
In FIG. 9, the data conversion program 12
0 automatically assigns the tag serial number when extracting the tag name from the extracted data transfer area 160 (60
0). In this embodiment, the data conversion program 120
Implements the seventh data conversion method having the above characteristics, and extracts the extracted data transfer area 1 according to the following procedure.
The data is output to the table insertion data area 182 based on the syntax data stored in 60.

【0123】データ変換プログラム120は、まず、第
一のデータ変換方法と同様に、マッピング定義情報領域
170に格納された指定に従って、タグ名や属性名、属
性値に対応した構文データをテーブル挿入データ領域1
82に格納する(7000、7001、7002、70
04、7005、7006)。
The data conversion program 120 firstly, in accordance with the specification stored in the mapping definition information area 170, converts the syntax data corresponding to the tag name, attribute name, and attribute value into the table insertion data, as in the first data conversion method. Area 1
82 (7000, 7001, 7002, 70
04, 7005, 7006).

【0124】次に、データ変換プログラム120が自動
的に採番するタグの通番を、テーブル挿入データ領域1
82に書き込む。図9においては、“注文明細”という
タグに対する通番に対して、“SEQ”というカラム名
が対応づけられており(7003)、その通番の値は
“2”なので、カラム名領域403にカラム名“SE
Q”を、カラム値領域404に通番の値の“2”を組に
して書き込んでいる(7007)。
Next, the serial number of the tag automatically numbered by the data conversion program 120 is stored in the table insertion data area 1
Write to 82. In FIG. 9, a column name “SEQ” is associated with a serial number corresponding to a tag “order details” (7003), and the serial number value is “2”. “SE
“Q” is written in the column value area 404 as a set of serial number values “2” (7007).

【0125】以上が、第七のデータ変換方法の処理手順
である。上記の手順によれば、マッピング定義情報領域
170内に、タグの通番に対応づけてカラム名を格納し
ておけば、XML文書内にタグの通番が記述されていな
くても、自動的に採番されたタグの通番を、所定のテー
ブルの所定のカラムへの格納やユーザプログラムへの受
け渡しなどに利用することが可能である。すなわち、上
記の手順によれば、第七のデータ変換方法の目的は達せ
られる。
The above is the processing procedure of the seventh data conversion method. According to the above procedure, if the column name is stored in the mapping definition information area 170 in association with the serial number of the tag, even if the serial number of the tag is not described in the XML document, it is automatically taken. The serial number of the numbered tag can be used for storage in a predetermined column of a predetermined table, delivery to a user program, and the like. That is, according to the above procedure, the purpose of the seventh data conversion method is achieved.

【0126】《第八の実施例》次に、第八の実施例につ
いて説明する。
<< Eighth Embodiment >> Next, an eighth embodiment will be described.

【0127】第八の実施例では、本発明が提供する複数
のデータ変換方法のうち、第八のデータ変換方法を説明
する。
In the eighth embodiment, an eighth data conversion method among a plurality of data conversion methods provided by the present invention will be described.

【0128】第八のデータ変換方法の目的は、連続する
複数のタグをひとまとまりとして扱い、それら複数のタ
グ上の構文データを一つのレコードとしてテーブルに挿
入できるようにすることである。これが実現できれば、
繰り返し要素を決まった順序で現れるタグの組で表現
し、それぞれのタグの属性値を一つのレコードとして所
定のテーブルに格納することが可能となる。
The purpose of the eighth data conversion method is to treat a plurality of consecutive tags as a group and to insert syntax data on the plurality of tags into a table as one record. If this can be achieved,
It is possible to represent a repeating element by a set of tags that appear in a predetermined order, and store the attribute value of each tag as a single record in a predetermined table.

【0129】本実施例においては、第八のデータ変換方
法を、第一の実施例と同じ構成の計算機システムで動作
するプログラムとして実現している。第一の実施例と本
実施例の相違点は、データ変換プログラムに対するマッ
ピング定義情報の与えかたと、データ変換プログラムの
処理手順のみである。
In this embodiment, the eighth data conversion method is realized as a program that operates on a computer system having the same configuration as that of the first embodiment. The only difference between the first embodiment and the present embodiment lies in the way in which the mapping definition information is provided to the data conversion program and the processing procedure of the data conversion program.

【0130】以下では、これらの相違点について説明
し、第一の実施例と同じ点については説明を省略する。
In the following, these differences will be described, and description of the same points as in the first embodiment will be omitted.

【0131】以下では、図10を用いて、第八のデータ
変換方法の処理手順について説明する。
The processing procedure of the eighth data conversion method will be described below with reference to FIG.

【0132】図10は、第八のデータ変換方法の動作原
理図である。
FIG. 10 is an operation principle diagram of the eighth data conversion method.

【0133】本実施例において、データ変換プログラム
120は、第八のデータ変換方法を実装しており、以下
の手順に従って、抽出データ受け渡し領域160に格納
された構文データを元に、テーブル挿入データ領域18
2にデータを出力する。
In the present embodiment, the data conversion program 120 implements an eighth data conversion method. The data conversion program 120 executes the following procedure, based on the syntax data stored in the extracted data transfer area 160, in the table insertion data area. 18
2 to output the data.

【0134】データ変換プログラム120は、まず、抽
出データ受け渡し領域160からタグ名の組を読み出
し、マッピング定義情報170内でそれらタグ名の組に
対応づけられたテーブル名を検索して、検索されたテー
ブル名をテーブル挿入データ領域182に書き込む。図
10においては、“製品番号”と“個数”というタグ名
の組に対して“ORDERITEM”というテーブル名
が対応づけられている(8000)ので、テーブル挿入
データ領域182上のテーブル名領域402に“ORD
ERITEM”を書き込んでいる(8003)。
The data conversion program 120 first reads a set of tag names from the extracted data transfer area 160, searches the mapping definition information 170 for a table name corresponding to the set of tag names, and searches the table. The table name is written into the table insertion data area 182. In FIG. 10, a table name “ORDERITEM” is associated with a set of tag names “product number” and “quantity” (8000), so that the table name area 402 on the table insertion data area 182 “ORD
ERITE ”is written (8003).

【0135】次に、第一のデータ変換方法と同様に、マ
ッピング定義情報領域170に格納された指定に従っ
て、タグ名や属性名、属性値や開きタグと閉じタグの間
のテキストデータに対応した構文データをテーブル挿入
データ領域182に格納する(8001、8002、8
004、8005)。
Next, in the same manner as in the first data conversion method, according to the specification stored in the mapping definition information area 170, tag names, attribute names, attribute values, and text data between an open tag and a close tag are handled. The syntax data is stored in the table insertion data area 182 (8001, 8002, 8
004, 8005).

【0136】以上が、第八のデータ変換方法の処理手順
である。上記の手順によれば、マッピング定義情報領域
170内に、タグ名の組に対応づけてテーブル名を格納
しておけば、複数のタグで表現されているひとまとまり
の構文データを、一つのレコードとして任意のテーブル
に挿入することが可能である。すなわち、上記の手順に
よれば、第八のデータ変換方法の目的は達せられる。
The processing procedure of the eighth data conversion method has been described above. According to the above procedure, if a table name is stored in the mapping definition information area 170 in association with a set of tag names, a group of syntax data expressed by a plurality of tags can be stored in one record. Can be inserted into any table. That is, according to the above procedure, the purpose of the eighth data conversion method is achieved.

【0137】これらの実施例によれば、ユーザは、タグ
セットと格納先のテーブルごとに専用のXML文書格納
プログラムを実装する必要がなくなり、開発コストが低
減することができる。
According to these embodiments, the user does not need to implement a dedicated XML document storage program for each of the tag set and the storage destination table, and the development cost can be reduced.

【0138】[0138]

【発明の効果】本発明によれば、データ項目名や変換先
のデータ形式における要素名の依存の少ない変換処理が
可能となる。
According to the present invention, it is possible to perform a conversion process in which the data item name and the element name in the data format of the conversion destination are less dependent.

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

【図1】本発明を適応した計算機システムの構成図FIG. 1 is a configuration diagram of a computer system to which the present invention is applied.

【図2】XML文書格納プログラム100のPAD図FIG. 2 is a PAD diagram of an XML document storage program 100;

【図3】第一のデータ変換方法の動作原理図FIG. 3 is an operation principle diagram of a first data conversion method.

【図4】第二のデータ変換方法の動作原理図FIG. 4 is an operation principle diagram of a second data conversion method;

【図5】第三のデータ変換方法の動作原理図FIG. 5 is an operation principle diagram of a third data conversion method.

【図6】第四のデータ変換方法の動作原理図FIG. 6 is an operation principle diagram of a fourth data conversion method;

【図7】第五のデータ変換方法の動作原理図FIG. 7 is an operation principle diagram of a fifth data conversion method;

【図8】第六のデータ変換方法の動作原理図FIG. 8 is an operation principle diagram of a sixth data conversion method.

【図9】第七のデータ変換方法の動作原理図FIG. 9 is an operation principle diagram of a seventh data conversion method.

【図10】第八のデータ変換方法の動作原理図FIG. 10 is an operation principle diagram of an eighth data conversion method.

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

10…計算機、11…主記憶装置、12…中央処理演算
装置、13…通信インタフェース、14…ディスクイン
タフェース、15…バス、16…ディスク装置、17…
ネットワーク、100…XML文書格納プログラム、1
10…データ抽出プログラム、120…データ変換プロ
グラム、130…データ出力プログラム、140…業務
プログラム、150…パラメタ受け渡し領域、151…
出力パラメタ領域、152…入力パラメタ領域、153
…コールバック入力パラメタ領域、154…コールバッ
ク出力パラメタ領域、160…抽出データ受け渡し領
域、170…マッピング定義情報領域、180…出力デ
ータ受け渡し領域、182…テーブル挿入データ領域、
200…XML文書、400…テーブル格納領域、40
2…テーブル名領域、403…カラム名領域、404…
カラム値領域、410…テーブル、500…ユーザコー
ルバックプログラム、501…カウンタ、600…タグ
通番
10 Computer, 11 Main Storage Device, 12 Central Processing Unit, 13 Communication Interface, 14 Disk Interface, 15 Bus, 16 Disk Device, 17
Network, 100 ... XML document storage program, 1
10: Data extraction program, 120: Data conversion program, 130: Data output program, 140: Business program, 150: Parameter transfer area, 151 ...
Output parameter area, 152 ... input parameter area, 153
... Callback input parameter area, 154 ... Callback output parameter area, 160 ... Extraction data transfer area, 170 ... Mapping definition information area, 180 ... Output data transfer area, 182 ... Table insertion data area
200 XML document, 400 Table storage area, 40
2 ... Table name area, 403 ... Column name area, 404 ...
Column value area, 410: table, 500: user callback program, 501: counter, 600: tag serial number

フロントページの続き (72)発明者 勝倉 桂一 神奈川県横浜市戸塚区戸塚町5030番地 株 式会社日立製作所ソフトウェア事業部内 Fターム(参考) 5B075 ND03 ND35 NK02 NK13 NK43 NK49 NK54 UU05 5B082 GA02 Continuing from the front page (72) Keiichi Katsukura, Inventor 5030 Totsuka-cho, Totsuka-ku, Yokohama-shi, Kanagawa Prefecture F-term in the Software Division, Hitachi, Ltd. 5B075 ND03 ND35 NK02 NK13 NK43 NK49 NK54 UU05 5B082 GA02

Claims (16)

【特許請求の範囲】[Claims] 【請求項1】タグ情報とタグ情報で定義されたデータと
を含むテキストデータを入力し、該タグ情報に基づいて
予めタグ情報に対応付けられたデータ変換ルールを参照
し、当該データ変換ルールに基づいて上記データを変換
して出力するデータ変換方法。
1. Text data including tag information and data defined by the tag information is input, and a data conversion rule previously associated with the tag information is referenced based on the tag information. A data conversion method for converting and outputting the data based on the data.
【請求項2】請求項1記載のデータ変換方法において、
処理対象データ識別情報が、階層的な識別情報の組み合
わせで表現されていることを特徴とするデータ変換方
法。
2. The data conversion method according to claim 1, wherein
A data conversion method, wherein the processing target data identification information is represented by a combination of hierarchical identification information.
【請求項3】請求項2記載のデータ変換方法において、
該階層的な識別情報の組み合わせの中に、テーブル名と
カラム名とを含むことを特徴とするデータ変換方法。
3. The data conversion method according to claim 2, wherein
A data conversion method, wherein a combination of the hierarchical identification information includes a table name and a column name.
【請求項4】請求項2または3記載のデータ変換方法に
おいて、該マッピング定義情報内で、該タグ名に対応づ
けられて指定された識別情報を、該処理対象データ識別
情報に含めることを特徴とするデータ変換方法。
4. The data conversion method according to claim 2, wherein identification information specified in the mapping definition information in association with the tag name is included in the processing target data identification information. Data conversion method.
【請求項5】請求項2または3記載のデータ変換方法に
おいて、該マッピング定義情報内で、該タグ名と該属性
名の組み合わせに対応づけられて指定された識別情報
を、該処理対象データ識別情報に含めることを特徴とす
るデータ変換方法。
5. The data conversion method according to claim 2, wherein the identification information specified in the mapping definition information in association with the combination of the tag name and the attribute name is replaced with the data to be processed. A data conversion method characterized by being included in information.
【請求項6】請求項2または3記載のデータ変換方法に
おいて、該処理対象データ出力処理では、該出力対象デ
ータそのものを出力する代わりに、該処理対象データに
対して、該マッピング定義情報内で指定された形式変換
処理を適用した結果のデータである、形式変換済み処理
対象データを出力することを特徴とするデータ変換方
法。
6. The data conversion method according to claim 2, wherein in the processing target data output processing, the processing target data is output in the mapping definition information instead of outputting the output target data itself. A data conversion method characterized by outputting format-converted data to be processed, which is data resulting from applying a specified format conversion process.
【請求項7】請求項2または3記載のデータ変換方法に
おいて、該処理対象データ取得処理では、該タグ付きテ
キストデータの他に、ユーザから渡されたパラメタを入
力に含めることを特徴とするデータ変換方法。
7. The data conversion method according to claim 2, wherein the data to be processed includes, in addition to the tagged text data, a parameter passed from a user in an input. Conversion method.
【請求項8】請求項2または3記載のデータ変換方法に
おいて、該処理対象データ出力処理では、該処理対象デ
ータをユーザが用意したデータ領域に対して出力するこ
とを特徴とする、データ変換方法。
8. The data conversion method according to claim 2, wherein in the processing target data output processing, the processing target data is output to a data area prepared by a user. .
【請求項9】請求項2または3記載のデータ変換方法に
おいて、該処理対象データ出力処理では、該出力対象デ
ータそのものを出力する代わりに、該処理対象データ
を、該マッピング定義情報内で指定されたユーザプログ
ラムに渡し、該ユーザプログラムの出力データであるユ
ーザプログラム処理済みデータを出力することを特徴と
するデータ変換方法。
9. The data conversion method according to claim 2, wherein, in the processing target data output processing, the processing target data is specified in the mapping definition information instead of outputting the output target data itself. A data conversion method, wherein the data is passed to a user program, and data processed by the user program, which is output data of the user program, is output.
【請求項10】請求項2または3記載のデータ変換方法
において、該マッピング定義情報内で、該タグ名と該属
性名および該属性値の組み合わせに対して対応づけられ
た識別情報を、該処理対象データ識別情報に含めること
を特徴とするデータ変換方法。
10. The data conversion method according to claim 2, wherein the identification information associated with the combination of the tag name, the attribute name, and the attribute value in the mapping definition information is processed by the processing. A data conversion method characterized by being included in target data identification information.
【請求項11】請求項2または3記載のデータ変換方法
において、ある基点となるタグと、該基点となるタグか
ら該マッピング定義情報内で指定された相対位置にある
タグの相方のタグから該変換処理対象データを取得する
ことを特徴とするデータ変換方法。
11. The data conversion method according to claim 2 or 3, wherein a tag as a base point and a tag at a relative position specified in the mapping definition information from the tag as the base point are determined by the tag. A data conversion method characterized by acquiring conversion target data.
【請求項12】請求項2または3記載のデータ変換方法
において、該処理対象データ取得処理では、取得する該
処理対象データが属するタグの通番を出力することを特
徴とするデータ変換方法。
12. The data conversion method according to claim 2, wherein, in the processing data acquisition processing, a serial number of a tag to which the processing data to be acquired belongs is output.
【請求項13】請求項2または3記載のデータ変換方法
において、該マッピング定義情報内で指定された連続す
る複数のタグを、ひとまとまりとして扱うことを特徴と
するデータ変換方法。
13. The data conversion method according to claim 2, wherein a plurality of continuous tags specified in the mapping definition information are treated as a unit.
【請求項14】請求項1記載のデータ変換方法におい
て、 上記タグ名と、任意の個数の属性名と属性値の対とを有
する文字列であるタグと、タグ以外のテキストデータで
あるプレーンテキストデータとを有するテキストデータ
であるタグ付きテキストデータを第一の入力とし、 該タグ付きテキストデータと出力データとの間の変換規
則を指定した定義情報であるマッピング定義情報を第二
の入力とし、 該マッピング定義情報の指定に従って、該タグ付きテキ
ストデータから変換処理の対象となるデータである処理
対象データを取り出す処理である処理対象データ取得処
理を実行し、 該処理対象データを該マッピング定義情報の指定に従っ
て出力する処理である処理対象データ出力処理を実行
し、該処理対象データ出力処理では、該処理対象データ
を識別する情報である処理対象データ識別情報と、該処
理対象データそのものとを出力することを特徴とするデ
ータ変換方法。
14. The data conversion method according to claim 1, wherein the tag name, a tag which is a character string having an arbitrary number of pairs of attribute names and attribute values, and a plain text which is text data other than the tags. The first input is tagged text data that is text data having data, and the second input is mapping definition information that is definition information that specifies a conversion rule between the tagged text data and output data. In accordance with the specification of the mapping definition information, a processing target data acquisition process for extracting processing target data that is data to be converted from the tagged text data is executed. A process target data output process, which is a process of outputting according to the designation, is executed. In the process target data output process, the process target data output process is performed. A data conversion method characterized by outputting processing target data identification information as information for identifying data and the processing target data itself.
【請求項15】タグ情報とタグ情報で定義されたデータ
とを含むテキストデータを入力する手段と、 該タグ情報に基づいて予めタグ情報に対応付けられたデ
ータ変換ルールを参照し、当該データ変換ルールに基づ
いて上記データを変換して出力する手段とを備えたこと
を特徴とするデータ変換装置。
15. A means for inputting text data including tag information and data defined by the tag information, and referring to a data conversion rule previously associated with the tag information based on the tag information, Means for converting and outputting the data based on a rule.
【請求項16】タグ情報とタグ情報で定義されたデータ
とを含むテキストデータを入力し、該タグ情報に基づい
て予めタグ情報に対応付けられたデータ変換ルールを参
照し、当該データ変換ルールに基づいて上記データを変
換して出力するデータ変換プログラムを格納した計算機
読み取り可能な記憶媒体。
16. Text data including tag information and data defined by the tag information is input, and a data conversion rule previously associated with the tag information is referred to based on the tag information. A computer-readable storage medium storing a data conversion program for converting and outputting the data based on the data.
JP11205459A 1999-07-19 1999-07-19 Method and device for data conversion, and storage medium storing data conversion program Withdrawn JP2001034513A (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
JP11205459A JP2001034513A (en) 1999-07-19 1999-07-19 Method and device for data conversion, and storage medium storing data conversion program

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
JP11205459A JP2001034513A (en) 1999-07-19 1999-07-19 Method and device for data conversion, and storage medium storing data conversion program

Publications (1)

Publication Number Publication Date
JP2001034513A true JP2001034513A (en) 2001-02-09

Family

ID=16507237

Family Applications (1)

Application Number Title Priority Date Filing Date
JP11205459A Withdrawn JP2001034513A (en) 1999-07-19 1999-07-19 Method and device for data conversion, and storage medium storing data conversion program

Country Status (1)

Country Link
JP (1) JP2001034513A (en)

Cited By (6)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
JP2002247215A (en) * 2001-02-16 2002-08-30 Nec Corp Inter-exchange control signal transmission system
JP2005500623A (en) * 2001-08-17 2005-01-06 ユニバーサル・ビジネス・マトリックス・エルエルシー How to add metadata to data
JP2006268133A (en) * 2005-03-22 2006-10-05 Dainippon Printing Co Ltd Database system, server, program and recording medium
JP2010026664A (en) * 2008-07-16 2010-02-04 Nomura Research Institute Ltd Transaction mediation device
WO2013191275A1 (en) * 2012-06-22 2013-12-27 オムロン株式会社 Control device
CN113068045A (en) * 2021-03-17 2021-07-02 厦门雅基软件有限公司 Data storage method and device, electronic equipment and computer readable storage medium

Cited By (10)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
JP2002247215A (en) * 2001-02-16 2002-08-30 Nec Corp Inter-exchange control signal transmission system
JP2005500623A (en) * 2001-08-17 2005-01-06 ユニバーサル・ビジネス・マトリックス・エルエルシー How to add metadata to data
JP2011028753A (en) * 2001-08-17 2011-02-10 Ubmatrix Inc Method for adding metadata to data
JP2006268133A (en) * 2005-03-22 2006-10-05 Dainippon Printing Co Ltd Database system, server, program and recording medium
JP4611780B2 (en) * 2005-03-22 2011-01-12 大日本印刷株式会社 Database system, server, program, and recording medium
JP2010026664A (en) * 2008-07-16 2010-02-04 Nomura Research Institute Ltd Transaction mediation device
WO2013191275A1 (en) * 2012-06-22 2013-12-27 オムロン株式会社 Control device
JPWO2013191275A1 (en) * 2012-06-22 2016-05-26 オムロン株式会社 Control device
US10061809B2 (en) 2012-06-22 2018-08-28 Omron Corporation Control device
CN113068045A (en) * 2021-03-17 2021-07-02 厦门雅基软件有限公司 Data storage method and device, electronic equipment and computer readable storage medium

Similar Documents

Publication Publication Date Title
TW501033B (en) Electronic shopping agent which is capable of operating with vendor sites which have disparate formats
USRE48030E1 (en) Computer-implemented system and method for tagged and rectangular data processing
US7228496B2 (en) Document editing method, document editing system, server apparatus, and document editing program
US8346803B2 (en) Dynamic generation of target files from template files and tracking of the processing of target files
US5987480A (en) Method and system for delivering documents customized for a particular user over the internet using imbedded dynamic content
JP4495895B2 (en) Method and system for reporting XML data from a legacy computer system
CA2669479C (en) Generating end-user presentations from structured data
US20010047365A1 (en) System and method of packaging and unpackaging files into a markup language record for network search and archive services
EP1225516A1 (en) Storing data of an XML-document in a relational database
US20060064428A1 (en) Methods and apparatus for mapping a hierarchical data structure to a flat data structure for use in generating a report
US20040221233A1 (en) Systems and methods for report design and generation
US6915303B2 (en) Code generator system for digital libraries
JP3946934B2 (en) Web page component integration processing device, web page component integration processing method, and client device
JP2003532173A (en) Method and system for applying an XML schema
JP2003529829A (en) Methods and systems for modeling legacy computer systems
JP2004506955A (en) Reusable data markup language
AU2005202103A1 (en) Programmable object model for namespace or schema library support in a software application
US20090112901A1 (en) Software, Systems and Methods for Modifying XML Data Structures
Sneed Wrapping legacy COBOL programs behind an XML-interface
MXPA03010779A (en) Method and computer-readable medium for importing and exporting hierarchically structured data.
US7860903B2 (en) Techniques for generic data extraction
US20090199158A1 (en) Apparatus and method for building a component to display documents relevant to the content of a website
US7779005B2 (en) Database management apparatus and method of managing database
JP2001034513A (en) Method and device for data conversion, and storage medium storing data conversion program
US20050273768A1 (en) Method of and system for providing path based object to XML mapping

Legal Events

Date Code Title Description
A761 Written withdrawal of application

Free format text: JAPANESE INTERMEDIATE CODE: A761

Effective date: 20060613