<br> You need to go down one level and use the DrlParser instead of the PackageBuilder:<br><br> final DrlParser parser = new DrlParser();<br> final PackageDescr pkg = parser.parse( reader );<br><br> []s<br>
Edson<br><br><div><span class="gmail_quote">2008/1/27, Mark McNally <<a href="mailto:mark.mcnally@comcast.net">mark.mcnally@comcast.net</a>>:</span><blockquote class="gmail_quote" style="border-left: 1px solid rgb(204, 204, 204); margin: 0pt 0pt 0pt 0.8ex; padding-left: 1ex;">
<div>
<p><font face="Arial">I would like to use the XmlDumper to convert my DRL to XML but am unsure of its use.<br>
In particular, I am wondering where to get the proper instance of PackageDescr to feed to the dump() method:<br>
<br>
XmlDumper xmlDumper = new XmlDumper();<br>
String xml = xmlDumper.dump( packageDescr );<br>
<br>
<br>
the code I'm using to read the DRL is straight from an example in the distro:<br>
<br>
Reader source = new InputStreamReader( PartSelectorImpl.class.getResourceAsStream( ruleSetName ) );<br>
PackageBuilder builder = new PackageBuilder();<br>
builder.addPackageFromDrl( source );<br>
Package pkg = builder.getPackage();<br>
RuleBase ruleBase = RuleBaseFactory.newRuleBase();<br>
ruleBase.addPackage( pkg );<br>
<br>
<br>
Would someone mind pointing in the right direction?<br>
<br>
Thanks, Mark </font>
</p>
</div>
<br>_______________________________________________<br>rules-users mailing list<br><a onclick="return top.js.OpenExtLink(window,event,this)" href="mailto:rules-users@lists.jboss.org">rules-users@lists.jboss.org</a><br><a onclick="return top.js.OpenExtLink(window,event,this)" href="https://lists.jboss.org/mailman/listinfo/rules-users" target="_blank">https://lists.jboss.org/mailman/listinfo/rules-users</a><br>
<br></blockquote></div><br><br clear="all"><br>-- <br> Edson Tirelli<br> JBoss Drools Core Development<br> Office: +55 11 3529-6000<br> Mobile: +55 11 9287-5646<br> JBoss, a division of Red Hat @ <a href="http://www.jboss.com">www.jboss.com</a>