Hi!,

I'm having a little problem with Digester's CallMethodRule: it doesn't call the method.

The XML file I try to parse is:

---
<configuration>
 <pages>
   <page path="/index.htm" class="test.TestPage" />
   <page path="/hello.htm" class="test.HelloPage" />
 </pages>
</configuration>
---

The Java code I'm trying to use for parsing the configuration:

---
...
Digester digester = new Digester();
digester.addObjectCreate("configuration", "test.Configuration");
digester.addObjectCreate("configuration/pages/page", "test.PageConfiguration"); digester.addSetProperties("configuration/pages/page", new String[]{"path", "class"}, new String[]{"path", "className"});
digester.addCallMethod("configuration/pages/page", "freeze");
digester.addSetNext("configuration/pages/page", "addPageConfiguration", "test.PageConfiguration");

Configuration configuration = (Configuration)digester.parse(reader);
---

The problem is that the freeze() method of instantiated PageConfiguration objects isn't ever called (which results to that the Configuration's addPageConfiguration(PageConfiguration) throws an IllegalStateException). How I should fix this? I'm using the version 1.7 of Digester.

- Mikko Nylén

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

Reply via email to