Yes, you absolutely can. Open the theme.res file with the Codename One Designer and add your xml file from the Data section on the left. Now you can load the file using the theme
object as follows:
InputStream is = theme.getData("yourFile.xml");
Alternatively, You can put your xml in the class path (e.g. java source directory) and load it as follows:
InputStream is = Display.getInstance().getResourceAsStream(null, "/yourFile.xml");
Once you got an InputStream
, simply wrap it with a Reader
XMLParser xmlParser = new XMLParser();
xmlParser.parse(new InputStreamReader(is, "UTF-8"));