Parsing a composite pattern with Digester

R

Ruben Stranders

I'm currently working on a program that needs to build a composite
object (a kind of tree) from a xml template file. The DTD is as
follows: (This program must support projects with deadlines, phases,
etc)

<!ELEMENT Project ((Phase*)>
<!ELEMENT Phase ((Phase | Deliverable)*)>
<!ELEMENT Deliverable EMPTY>

An example XML file:

<Project>
<Phase>
<Deliverable/>
<Phase>
<Deliverable/>
</Phase>
</Phase>
<Deliverable/>
</Project>

I want to build a Java tree from these kind of xml template files.
I've tried Apache's Digester, but I'm not sure if what I want is
possible. Could anyone tell me if Digester can parse these kind of
files? If not, what should I use?

kind regards,

Ruben Stranders
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Members online

No members online now.

Forum statistics

Threads
473,769
Messages
2,569,579
Members
45,053
Latest member
BrodieSola

Latest Threads

Top