[jdom-interest] reading name-value pairs
jonbaer at digitalanywhere.com
Mon May 14 08:36:07 PDT 2001
Well technically you can't have 2 roots (<sqlquery>) so you need to have
something over it like:
From this you could do something as such:
Document doc = builder.build(file);
List queries = doc.getRootElement().getChildren("sqlquery");
Michael Kastner wrote:
> 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:
> SELECT * FROM houses
> SELECT * FROM tenants
> 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
> To control your jdom-interest membership:
More information about the jdom-interest