[rules-users] XmlDumper use
Mark McNally
mark.mcnally at comcast.net
Sun Jan 27 17:05:17 EST 2008
I would like to use the XmlDumper to convert my DRL to XML but am unsure
of its use.
In particular, I am wondering where to get the proper instance of
PackageDescr to feed to the dump() method:
XmlDumper xmlDumper = new XmlDumper();
String xml = xmlDumper.dump( packageDescr );
the code I'm using to read the DRL is straight from an example in the
distro:
Reader source = new InputStreamReader(
PartSelectorImpl.class.getResourceAsStream( ruleSetName ) );
PackageBuilder builder = new PackageBuilder();
builder.addPackageFromDrl( source );
Package pkg = builder.getPackage();
RuleBase ruleBase = RuleBaseFactory.newRuleBase();
ruleBase.addPackage( pkg );
Would someone mind pointing in the right direction?
Thanks, Mark
-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://lists.jboss.org/pipermail/rules-users/attachments/20080127/6a00a25b/attachment.html
More information about the rules-users
mailing list