commons-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Borut BolĨina <...@najdi.si>
Subject [Configuration] XPath support
Date Sun, 23 Oct 2005 19:31:40 GMT
Hello, me again

Is there a plan to add XPath support for accessing structured properties 
of XML configuration files? It would be great, if one could extract a 
list of all field names of the system table like this:

database/tables/table[@tableType='system']/fields/field/name
or shorter
//table[@tableType='system']/fields/field/name

<database>
    <tables>
        <table tableType="system">
            <name>users</name>
            <fields>
                <field>
                    <name>uid</name>
                    <type>long</type>
                </field>
                <field>
                    <name>uname</name>
                    <type>java.lang.String</type>
                </field>
                <field>
                    <name>firstName</name>
                    <type>java.lang.String</type>
                </field>
                <field>
                    <name>lastName</name>
                    <type>java.lang.String</type>
                </field>
                <field>
                    <name>email</name>
                    <type>java.lang.String</type>
                </field>
            </fields>
        </table>
        <table tableType="application">
            <name>documents</name>
            <fields>
                <field>
                    <name>docid</name>
                    <type>long</type>
                </field>
                <field>
                    <name>name</name>
                    <type>java.lang.String</type>
                </field>
                <field>
                    <name>creationDate</name>
                    <type>java.util.Date</type>
                </field>
                <field>
                    <name>authorID</name>
                    <type>long</type>
                </field>
                <field>
                    <name>version</name>
                    <type>int</type>
                </field>
            </fields>
        </table>
    </tables>
</database>

Regards,
Borut

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


Mime
View raw message