commons-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Nalika Dissanayaka <nal...@gmail.com>
Subject Digester: Problem of loading parents attribute to the child
Date Thu, 07 Oct 2004 18:11:57 GMT
Hi,

I am having a difficulty to load the following XML file by using the
commons Digester. Is there anyone that can help me on this...

XML FILE

<?xml version="1.0" encoding="UTF-8"?>
<metadata lang="en-US" environment="Production" revision="001">
       <Sender>
               <Name>my nameDC</Name>
               <Address>my address </Address>
       </Sender>
       <DataArea>
               <Data Set>
                       <Data>
                               <attr1></attr1>
                               <attr2></attr2>

                               <attrn></attrn>

                       </Data>
                       <Data>
                               <attr1></attr1>
                               <attr2></attr2>

                               <attrn></attrn>
                       </Data>
               </Data Set>
       </DataArea>
</metadata>

I am only interested getting the list of "Data" objects. The issue is,
Data class has a attribute  called "lang" which should be loaded from
the value of the "lang" in the "metadata" node. (I am planning to load
series of files where metadata lang can be changed based on the
locale)

What are the possible approaches that I can use ?. Is this something
that can be done by using the commons Digester. (I have no problrm of
loading the list of "Data")

Thanks in advance
Nalika

---------------------------------------------------------------------
To unsubscribe, e-mail: commons-user-unsubscribe@jakarta.apache.org
For additional commands, e-mail: commons-user-help@jakarta.apache.org


Mime
View raw message