xmltoexcel
XML形式のツリー構造データをExcelテーブル形式へ変換する。複数のXMLファイルをExcelテーブルへ統合できる。Convert multiple tree-structured datasets in XML files into a unified Excel table.
Science Score: 67.0%
This score indicates how likely this project is to be science-related based on various indicators:
-
✓CITATION.cff file
Found CITATION.cff file -
✓codemeta.json file
Found codemeta.json file -
✓.zenodo.json file
Found .zenodo.json file -
✓DOI references
Found 7 DOI reference(s) in README -
✓Academic publication links
Links to: zenodo.org -
○Academic email domains
-
○Institutional organization owner
-
○JOSS paper metadata
-
○Scientific vocabulary similarity
Low similarity (6.4%) to scientific vocabulary
Repository
XML形式のツリー構造データをExcelテーブル形式へ変換する。複数のXMLファイルをExcelテーブルへ統合できる。Convert multiple tree-structured datasets in XML files into a unified Excel table.
Basic Info
Statistics
- Stars: 0
- Watchers: 0
- Forks: 0
- Open Issues: 0
- Releases: 10
Metadata Files
README.md
Please follow the license and cite the DOI when you use this software.
XmlToExcel
XML形式のツリー構造データをExcelテーブル形式へ変換する。複数のXMLファイルをExcelテーブルへ統合できる。Convert multiple tree-structured datasets in XML files into a unified Excel table.
- xmltoexcel.py: メインプログラム
- module.py: サブモジュール
- examples: 使用例。ISO Geographic MetaData (GMD) 準拠のXMLを使った例。
動作確認環境
- python 3.10.11
- ライブラリ
- fire 0.7.0
- flatten_dict 0.4.2
- lxml 4.9.2
- pandas 2.0.2
- openpyxl 3.1.5
入力データ
XMLファイル
- examples/xml/metadata1.xml, metadata2.xml
要素名定義テーブル
- examples/ElementDefine.xlsx
データテーブルの要素名とサンプルXMLの各XPathの対応付けを定義する。要素名の階層構造はスラッシュ(/)で表す。出力データの行の並び順もこのテーブルに従う。ExcelToXmlと同じものを使用できる。
| Element Name | XPath |
|---|---|
| 要素名A-1 | パスA-1 |
| 要素名A-2 | パスA-2 |
| 要素名A-2/要素名A-2-2 | パスA-2-2(パスA-2の続き) |
| … | |
| 要素名B-1 | パスB-1 |
| … |
出力
- examples/output/table.xlsx: 要素名定義テーブルに従いExcelテーブル形式へ変換したXMLデータ
- examples/output/table.pkl: Excel化する前のPython PandasデータをPickleで保存したもの
- examples/output/table_path.xlsx: 要素名定義テーブルを処理の際に整形したものをExcelで保存したもの
ヘルプ表示
bashで
python xml_to_excel.py --help
pythonで
import xml_to_excel
help(xml_to_excel)
examplesの実行方法
./examples.sh
License
This software is released under the MIT License.
It also makes use of the following third-party libraries, each of which is distributed under its own open-source license:
- fire — Apache License 2.0
- flatten_dict — MIT License
- lxml — BSD-style License
- pandas — BSD License
- openpyxl — Licensed under the MIT License.
AMIDERプロジェクト
Owner
- Name: AMIDER-dev
- Login: AMIDER-dev
- Kind: organization
- Repositories: 1
- Profile: https://github.com/AMIDER-dev
Citation (CITATION.cff)
cff-version: 1.2.0 authors: - family-names: "Kozai" given-names: "Masayoshi" orcid: "https://orcid.org/0000-0002-3948-3666" - family-names: "Tanaka" given-names: "Yoshimasa" orcid: "https://orcid.org/0000-0001-7276-4868" - family-names: "Abe" given-names: "Shuji" orcid: "https://orcid.org/0000-0001-8270-0024" - family-names: "Minamiyama" given-names: "Yasuyuki" orcid: "https://orcid.org/0000-0002-7280-3342" - family-names: "Shinbori" given-names: "Atsuki" orcid: "https://orcid.org/0000-0002-6018-7431" title: "XmlToExcel" abstract: > XmlToExcel is a software developed as part of the AMIDER project (https://amider.rois.ac.jp/). Please follow the license and cite the DOI when you use this software. doi: "10.5281/zenodo.15590207" url: "https://github.com/AMIDER-dev/XmlToExcel"
GitHub Events
Total
- Release event: 4
- Public event: 1
- Push event: 21
- Create event: 4
Last Year
- Release event: 4
- Public event: 1
- Push event: 21
- Create event: 4