Hiya folks, I am trying to make use of the Modello framework to build a very simple xml parser which can parse out a tree-like node structure, kinda like this:

---8<----
<layout>
    <name>default</name>

    <nodes>
        <node>
            <name>testing</name>
        </node>

        <group>
            <name>testing</name>
        </group>
    </nodes>
</layout>
--->8---

Where the .mdo defines the Layout class as taking * Node instances by interface and Group implements Node and extends from NodeSupport. Node is defined externally in the src/main/java tree... since <interfaces>... usage seems to spin around here:

<snip
at org.codehaus.modello.plugin.java.JavaModelloGenerator.generateJava (JavaModelloGenerator.java:127) at org.codehaus.modello.plugin.java.JavaModelloGenerator.generate (JavaModelloGenerator.java:68) at org.codehaus.modello.core.DefaultModelloCore.generate (DefaultModelloCore.java:288) at org.codehaus.modello.maven.AbstractModelloGeneratorMojo.execute (AbstractModelloGeneratorMojo.java:196) at org.apache.maven.plugin.DefaultPluginManager.executeMojo (DefaultPluginManager.java:443)
    ....
</snip>

I've alos defined a NodeSupport class which defines that name field to a String and implements Node too. So what I'd like is for modello to generate a parser which will recognize "node" and make a new NodeSupport() and recognize "group" and make a new Group() and then go about its normal processing fluff.

I've been hacking at this for like hours now... keep thinking I've gotten it working, but alas it seems to be futile. :-(

Anyone know if Modello can be configured to even to this?

I'd really like to use Modello, cause it spits out tiny parsers that do the job well (er if the input is correct and I'm not hitting a limitation that is).

Anyways... I've given it my shot... and now I've gotta ask for some help adivse.

Anyone got  clue how to make it work?

--jason



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

Reply via email to