[jdom-interest] reading name-value pairs

Michael Kastner kastner at galt.de
Mon May 14 07:40:48 PDT 2001


Hello,

I am using JDOM for reading and traversing configuration files for web
applications. At the moment I am stuck with a kind of silly problem, but I
haven't found a solution so far.

Suppose I have this code:

<sqlquery>
    <name>
        QueryHouses
    </name>
    <query>
        SELECT * FROM houses
    </query>
<sqlquery>
<sqlquery>
    <name>
        QueryTenants
    </name>
    <query>
        SELECT * FROM tenants
    </query>
<sqlquery>

How can I access the second query by its name? Or, to make it clear: how can
I tell JDOM that all tags within <sqlquery> (i.e. "QueryTenants" and "SELECT
* FROM tenants") belong together?

Maybe someone can help?

Michael Kastner
galt.de




More information about the jdom-interest mailing list