简体   繁体   English

如何将此HTML文本转换为SQLite数据库?

[英]How do I convert this HTML text to an SQLite database?

<h1>Abasement</h1>
<hw>A*base"ment</hw> <tt>(#)</tt>, 
<tt>n.</tt> 
<ety>[Cf. F. <ets>abaissement</ets>.]</ety> 
<def>The act of abasing, humbling, or bringing low; the state of being abased or humbled;humiliation.</def>

I have a file with definitions of words like this, enclosed in tags. 我有一个文件,文件中包含这样的单词定义。 I'd like to convert this to an SQLite database with the fields Word, Pronunciation, Part_Of_Speech, Etymology and Definition. 我想将其转换为具有单词,发音,Part_Of_Speech,词源和定义字段的SQLite数据库。 Any help is appreciated. 任何帮助表示赞赏。

[My first question here!] [我的第一个问题在这里!]

You can't just simply 'convert' it (unless there happens to be a tool out there that would do it for you). 您不能只是简单地“转换”它(除非碰巧有一个可以为您完成该任务的工具)。 You have to create a SQLite database first and create a table for the data. 您必须首先创建一个SQLite数据库,并为数据创建一个表。 Maybe name the table 'Words', then create columns for each field, and figure out how to do a SQL INSERT to get your data into it. 也许将表命名为“ Words”,然后为每个字段创建列,并弄清楚如何执行SQL INSERT将数据放入表中。

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

相关问题 如何将图像转换为字符串以将其读/写到 SQLite 数据库 - Android Studio (Java) - How do I convert an image to a String to read/write it to a SQLite Database - Android Studio (Java) 如何将SQlite数据库加载到Recyclerview中? - How do I load a SQlite Database into Recyclerview? ANDROID - 如何从单选按钮获取文本并将其插入到 sqlite 数据库? - ANDROID - how do I get text from radio button and insert it to sqlite database? 使用jsoup将html转换为纯文本时,如何保留换行符? - How do I preserve line breaks when using jsoup to convert html to plain text? 我如何在 Java 中将文本转换为整数 - how do I convert text to integer in Java 如何通过 ID 从 SQLITE 数据库中删除数据 - How do I delete data from SQLITE database by ID 如何导出内部带有sqlite数据库的jar? - How do I export a jar with an sqlite database inside? 如何将现有的 SQLite3 数据库导入 Room? - How do I import an existing SQLite3 database into Room? 如何知道是否单击了在SQLite数据库中创建的TextView? - How do I tell if a TextView created in my SQLite database was clicked? 如何将现有的SQLite数据库连接到ExpandableListView? - How do I connect an existing SQLite database to an ExpandableListView?
 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM