Back to LanguageTool Homepage - Privacy - Imprint

Is there anyway to transfer rules.xml to SQL DB?


My study on LT is going on…I come across an engineering issue about the rules used in LT…

In order to ease rule expansion, I am designing a web interface to help users to create their own rules…I would like to store these rules in SQL DB…However, currently they are stored in the rules.xml…I would like to transfer this rules.xml to SQL DB, like mysql, to do this…

Therefore, I think a schema of the rules.xml is needed in order to design the mysql tables…Any clues please?


The rule syntax is quite complex, I don’t think it makes sense to save rules to the database other than as an XML string, with one rule per database row. You could use the rule’s ID as metadata to easier find the rules.

I assume you’re aware of our web-based rule editor at

I agree with Daniel, relational databases do not match with our rule model and therefore I would discourage you from using them.

However, it may worth to have a look into NoSQL databases, such as MongoDB. You can store rules, group them as rulegroups, categories etc.

MongoDB supports JSON out of the box, and conversion between XML and JSON is quite straightforward, both ways. Besides it has flexibility so you don’t need to update schemas on every rule enhacement.

It is Free Software and it has a mild learning curve, so I would give it a try.