commons-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Tim Weeks" <Tim.We...@sas.com>
Subject Commons Configuration
Date Tue, 03 Feb 2004 21:41:38 GMT
I have recently begun using the Commons Configuration interface to read XML config data.  I
noticed in the examples using tables.xml I could make calls like this to return a list of
values; "tables.table(0).fields.field.name"  Is there a way to search based on the value of
an XML entry?  For example given this XML file

<database>
  <tables>
    <table tableType="system">
      <name>users</name>
      <fields>
        <field>
          <name>uid</name>
          <type>long</type>
        </field>
      </fields>
    </table>    
    <table tableType="system">
      <name>tables</name>
      <fields>
        <field>
          <name>uid</name>
          <type>long</type>
        </field>
      </fields>
    </table>    
  </tables>
</database>

I would like to be able to grab all the fields in the users table by filtering on the table
name.  I was guessing something like this; "tables.table[name = 'users'].fields.field.name"
but was unable to find the correct syntax.

Thanks for any help,
Tim



---------------------------------------------------------------------
To unsubscribe, e-mail: commons-dev-unsubscribe@jakarta.apache.org
For additional commands, e-mail: commons-dev-help@jakarta.apache.org


Mime
View raw message