Hi Esteban,
I need to know whether we can* convert XML file to normal drl file* in
Drools 5.3.0 Final Guvnor.If it is possible how??
PackageBuilderConfiguration conf = new PackageBuilderConfiguration();
XmlPackageReader reader = new
XmlPackageReader(conf.getSemanticModules());
DrlDumper dumper = new DrlDumper();
FileReader filereader = new
FileReader("test_ParseGlobal.xml");
PackageDescr descr = reader.read(filereader);
String test = dumper.dump(descr);
System.out.println(test);
FileWriter writer = new FileWriter(new
File("test_ParseGlobal.drl"));
writer.write(dumper.dump(descr));
writer.flush();
writer.close();
This is my code to convert it..Is it correct?..My XML file
test_ParseGlobal.xml contains the rule content what is present in the above
link.But the above code compilation fails and returning
Exception in thread "main" java.lang.NullPointerException
at
org.drools.xml.ExtensibleXmlParser.resolveSchema(ExtensibleXmlParser.java:696)
at
org.drools.xml.ExtensibleXmlParser.resolveEntity(ExtensibleXmlParser.java:622)
at org.apache.xerces.util.EntityResolverWrapper.resolveEntity(Unknown
Source)
at org.apache.xerces.impl.XMLEntityManager.resolveEntity(Unknown Source)
--
View this message in context:
http://drools.46999.n3.nabble.com/XML-Rule-Language-Please-help-tp3587815...
Sent from the Drools: User forum mailing list archive at
Nabble.com.