Though the post is very old, it may help someone to know the solution
public static void XMLtoDRL() {
try {
PackageBuilderConfiguration conf = new PackageBuilderConfiguration();
final XmlPackageReader xmlPackageReader = new XmlPackageReader(
conf.getSemanticModules());
xmlPackageReader.read(new InputStreamReader(XMLtoDRLConverter.class
.getResourceAsStream("Sample.xml")));
final PackageDescr pkg = xmlPackageReader.getPackageDescr();
final DrlDumper drlDumper = new DrlDumper();
final String drlResult = drlDumper.dump(pkg);
System.out.println(drlResult);
} catch (SAXException e) {
// TODO Auto-generated catch block
e.printStackTrace();
} catch (IOException e) {
// TODO Auto-generated catch block
e.printStackTrace();
}
}
--
View this message in context:
http://drools.46999.n3.nabble.com/How-to-read-XML-using-XMLPackageReader-...
Sent from the Drools: User forum mailing list archive at
Nabble.com.