* @param sortedByPrimaryKey If true, the entries will be sorted by primary key
* @return ExportBuilder to allow for chaining
*/
public ExportBuilder addTablesByDataSet(URL resourceUrl, boolean sortedByPrimaryKey) {
try {
Set<String> tableNames = JuCollectionUtils.asSameOrderSet(new XPathGetter(XmlUtils.loadXml(resourceUrl)).getNodeNames("dataset/*"));
for (String tableName : tableNames) {
if (sortedByPrimaryKey) {
this.addTableSorted(tableName);
} else {
this.addTable(tableName);