Juan,
I don't know if it will suit your needs, but I've had good luck with
betwixt project which I think is based on Digester.

Gary.


On Mon, 2003-12-22 at 18:18, Juan Alvarado wrote:
> Simon thanks for all of  your help and comments.
> 
> Off the top of your head can you tell me what tools you have used if  
> any that will allow me to convert from object to xml.
> 
> Thanks in advance
> 
> On Dec 22, 2003, at 6:14 PM, Simon Kitching wrote:
> 
> > On Tue, 2003-12-23 at 11:45, Juan Alvarado wrote:
> >> Hello:
> >>
> >
> > Hi Juan,
> >
> > In the CVS repository there are now some examples of using Digester  
> > that
> > will hopefully answer your questions. You can see these examples by
> > following the instructions for checking out files from CVS, or use the
> > CVS web interface to browse/download the files.
> >
> > See:
> > http://cvs.apache.org/viewcvs.cgi/jakarta-commons/digester/src/
> > examples/
> >
> > The page http://jakarta.apache.org/commons/digester/ has a Resources
> > section that contains links to some published articles about Digester
> > that may also be useful.
> >
> > You should make sure you read the package description for digester.
> > Follow the instructions in the "Documentation" section of the page
> > linked above.
> >
> >> As you can see, the node <DebitRequests ReportSuccesses="true">
> >> contains an attribute ReportSuccesses="true". I need to be able to  
> >> grab
> >> that value so that it can be populated into my corresponding bean.
> >> Additionally there might be times when there is more than one  
> >> attribute
> >> in a given node and obviously I would need to get those values also.
> >> Could someone please tell me if this is possible and if so, how to
> >> accomplish this.
> >
> > It is definitely possible to map xml attributes to properties in your
> > classes. The examples demonstrate how to do this.
> >
> >>
> >> NEXT QUESTION:
> >>
> >> My application not only has to parse this XML stream, but we also have
> >> to create this XML from in certain situations. We might for example
> >> receive a request through the web with the necessary parameters and
> >> values needed to construct the XML and then pass on to the next layer.
> >> Can anyone tell me if the digester framework can handle this and if  
> >> so,
> >> I'd appreciate some sample code.
> >
> > If you are asking about converting a set of CGI parameters to XML, then
> > no Digester won't help with this.
> >
> > If you are asking about converting a tree of java objects into an XML
> > representation ("serializing to xml") then you should have a look at
> > "betwixt" which is also a Jakarta Commons project.
> >
> > Digester only handles xml->objects, not objects->xml.
> >
> >>
> >> Thanks in advance.
> >
> > You're welcome. If you have more questions after reading the docs feel
> > free to ask. One minor note: by convention emails in this list should
> > have the project listed in square brackets, eg
> >   "[digester] how to handle xml attributes?"
> >
> > Subscribers to this list often filter emails using this pattern, so if
> > you don't use it then your email might not reach the right people...
> >
> > Regards,
> >
> > Simon
> >
> >
> >
> > ---------------------------------------------------------------------
> > To unsubscribe, e-mail: [EMAIL PROTECTED]
> > For additional commands, e-mail: [EMAIL PROTECTED]
> >
> >
> 
> 
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: [EMAIL PROTECTED]
> For additional commands, e-mail: [EMAIL PROTECTED]
-- 
Gary S. Cuozzo <[EMAIL PROTECTED]>
Innovation Software Group, LLC


---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]

Reply via email to