Hi,

Q1 - Is there currently a mechanism via generated castor java classes to
find specific data required (from within the java generated methods
provided).  For example assuming in the following xml (see below) if one has
already loaded the <main-item> via castor generated java classes, but then
wishes to find the appropriate configs/config within this section of the xml
(i.e.  the main-item entry "config" is a reference to one of the "config"
items under "configs") , does castor currently support this?  That is, it
would be nice to have finder methods on the generated java classes so once
you have a <configs> java instance you can issue a finder method for a
<config> item and pass the <config-name> in.  For example:

- what is available: MainXML.getConfigs().getConfig(23)
- but what about: MainXML.getConfigs().findConfig ("mainConfig");

Q2 - If there is no support for this within the generated java classes what
is recommended? Via xpath? Have to write your own short java finder classes
which iterate through until the item is found?

ATTACHMENT - XML REFERED TO
============================
< MainXML xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance";
xsi:noNamespaceSchemaLocation="xxx.xsd">

<configs>

<config>

<config-name>mainConfig</config-name>

<report_width>1</report_width>

</config>

<config>

<config-name>testConfig</config-name>

<report_width>0</report_width>

</config>



</configs>

<main-config>

<main-item>

<itemName>TestItem</itemName>

<config>mainConfig</config>

</main-item>

</main-config>

</MainXML>





Thanks in advance

Greg

_________________________________________________________________
Get less junk mail with ninemsn Premium. Click here http://ninemsn.com.au/premium/landing.asp


----------------------------------------------------------- If you wish to unsubscribe from this mailing, send mail to
[EMAIL PROTECTED] with a subject of:
unsubscribe castor-dev




Reply via email to