commons-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Juan Alvarado <>
Subject Digester Question
Date Mon, 22 Dec 2003 22:45:49 GMT

I am relatively new to xml parsing and I just started using the 
commons-digester tools and it seems like it might fit my needs.

First let me apologize to all you seasoned pros in the field of XML in 
the event that my question seems too simple or if I am just not using 
the right terminology.

My question is as follows.

The particular XML that I am working with and in need to parse is 
composed as follows:

<?xml version="1.0"?>
<DebitRequests ReportSuccesses="true">
<DebitRequest id="1" type="misctrans">

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.


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.

Thanks in advance.

To unsubscribe, e-mail:
For additional commands, e-mail:

View raw message