I used XML in the example above because it is a common data format which is easy to read by humans. XML is a possible method of storing your data if you want to. Java has built-in APIs for reading/writing/parsing XML files. A good tutorial can be found here:
Reading XML Data into a DOM (The Java™ Tutorials > Java API for XML Processing (JAXP) > Document Object Model)
However, you don't
need to do this with XML. You can use any file format, even one you create. For example, you can have:
TYPE_ONE++++Rule Name1++++Rule text 1
TYPE_TWO++++Rule Name2++++Rule text 2
TYPE_TWO++++Rule Name3++++Rule text 3
This format would require more explanation, but it contains the same data. In the above input example, I have each rule on its own line, and I have the data separated with the delimiter:
++++. NOTE: I chose ++++ because you need to choose a delimiter which will not realistically appear in any of your data fields.
As you can see, not nearly as legible as the XML, but serves its purpose just the same.
As a comparison of the two:
Which is a smaller file size? The second one
Which is more structured? The XML one
Which is probably easier to code the reading mechanism for your program? The second one
Which is probably easier for you to edit manually? The XML one
Which is probably easier to notice mistakes and check? The XML one
At the end of the day, you need to assess the tradeoffs and determine which one you are more comfortable using.