<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0 Transitional//EN">
<HTML><HEAD>
<META HTTP-EQUIV="Content-Type" CONTENT="text/html; charset=us-ascii">
<TITLE>Message</TITLE>
<META content="MSHTML 6.00.2900.3243" name=GENERATOR></HEAD>
<BODY>
<DIV><SPAN class=640243402-29012008><FONT face=Arial color=#0000ff size=2>Thank
you Edson.</FONT></SPAN></DIV>
<BLOCKQUOTE style="MARGIN-RIGHT: 0px">
<DIV></DIV>
<DIV class=OutlookMessageHeader lang=en-us dir=ltr align=left><FONT
face=Tahoma size=2>-----Original Message-----<BR><B>From:</B>
rules-users-bounces@lists.jboss.org
[mailto:rules-users-bounces@lists.jboss.org] <B>On Behalf Of </B>Edson
Tirelli<BR><B>Sent:</B> Monday, January 28, 2008 12:16 PM<BR><B>To:</B> Rules
Users List<BR><B>Subject:</B> Re: [rules-users] XmlDumper
use<BR><BR></FONT></DIV><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="PADDING-LEFT: 1ex; MARGIN: 0pt 0pt 0pt 0.8ex; BORDER-LEFT: rgb(204,204,204) 1px solid">
<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>
</BLOCKQUOTE></BODY></HTML>