如何将.docx转换为数组或字典?(How do I go about converting .docx into an array or dictionary?)

编程入门 行业动态 更新时间:2024-10-28 01:27:38
如何将.docx转换为数组或字典?(How do I go about converting .docx into an array or dictionary?)

我目前正在尝试构建一个与我自己和同学的定义相匹配的iOS游戏。

我很难想如何将带有.docx文件中定义的单词列表转换成某些东西(JSON,XML,...),然后我可以将它读入数组或字典。

.docx中的大多数单词都具有以下格式:“Word():Definition。”

I am currently trying to build an iOS game that match word with its definition for myself and my classmates.

I'm having a hard time thinking how do I go about converting a list of words with their definitions in a .docx files into something(JSON, XML, ...) that I can then read it into an Array or Dictionary.

Most of the words in the .docx have the following format: " Word (): Definition. "

最满意答案

使用excel会更容易。 Excel已经具有导出到xml的功能,并且应该让您的生活更轻松,而不是从docx中获取所有单词,然后将它们转换为JSON或XML。

http://www.excel-easy.com/examples/xml.html

This would be easier with excel. Excel already has the function to export to xml, and should make your life a lot easier, instead of getting all the words out of docx and then converting them to either JSON or XML.

http://www.excel-easy.com/examples/xml.html

更多推荐

本文发布于:2023-08-02 09:40:00,感谢您对本站的认可!
本文链接:https://www.elefans.com/category/jswz/34/1372171.html
版权声明:本站内容均来自互联网,仅供演示用,请勿用于商业和其他非法用途。如果侵犯了您的权益请与我们联系,我们将在24小时内删除。
本文标签:数组   转换为   如何将   字典   docx

发布评论

评论列表 (有 0 条评论)
草根站长

>www.elefans.com

编程频道|电子爱好者 - 技术资讯及电子产品介绍!