<!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>&nbsp;&nbsp;&nbsp; You need to go down one level 
  and use the DrlParser instead of the 
  PackageBuilder:<BR><BR>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; final 
  DrlParser parser = new 
  DrlParser();<BR>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; final PackageDescr 
  pkg = parser.parse( reader );<BR><BR>&nbsp;&nbsp; []s<BR>&nbsp;&nbsp; 
  Edson<BR><BR>
  <DIV><SPAN class=gmail_quote>2008/1/27, Mark McNally &lt;<A 
  href="mailto:mark.mcnally@comcast.net">mark.mcnally@comcast.net</A>&gt;:</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>&nbsp;&nbsp;&nbsp; &nbsp;&nbsp;&nbsp; XmlDumper xmlDumper = 
    new XmlDumper();<BR>&nbsp; &nbsp; &nbsp;&nbsp;&nbsp; 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>&nbsp;&nbsp;&nbsp; 
    &nbsp;&nbsp;&nbsp; Reader source = new InputStreamReader( 
    PartSelectorImpl.class.getResourceAsStream( ruleSetName ) 
    );<BR>&nbsp;&nbsp;&nbsp; &nbsp;&nbsp;&nbsp; PackageBuilder builder = new 
    PackageBuilder();<BR>&nbsp;&nbsp;&nbsp; &nbsp;&nbsp;&nbsp; 
    builder.addPackageFromDrl( source );<BR>&nbsp;&nbsp;&nbsp; 
    &nbsp;&nbsp;&nbsp; Package pkg = builder.getPackage();<BR>&nbsp;&nbsp;&nbsp; 
    &nbsp;&nbsp;&nbsp; RuleBase ruleBase = 
    RuleBaseFactory.newRuleBase();<BR>&nbsp;&nbsp;&nbsp; &nbsp;&nbsp;&nbsp; 
    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>&nbsp;&nbsp;Edson Tirelli<BR>&nbsp;&nbsp;JBoss Drools 
  Core Development<BR>&nbsp;&nbsp;Office: +55 11 
  3529-6000<BR>&nbsp;&nbsp;Mobile: +55 11 9287-5646<BR>&nbsp;&nbsp;JBoss, a 
  division of Red Hat @ <A href="http://www.jboss.com">www.jboss.com</A> 
</BLOCKQUOTE></BODY></HTML>