I'm having trouble getting the Configuration to work.  As you can see below it
isn't reading the xml file properly.  Everything is getting jumbled up.

If I use Digester by itself it works fine.

I copied most of this from the sample files and the website.

Create configuration.
configFactory = new configurationFactory();
configFactory.setConfigurationURL(...);
configDoc = new ConfigurationXMLDocument(configFactory.getconfiguration());

Instantiate the digester object.
Digester digester  = new 
digester(configDoc.createXMLReader("LeakDetector.ConcurrentListeners"));


Configuration file.
<?xml version="1.0" encoding="ISO-8859-1" ?>
<configuration>
    <additional>
        <hierarchicalXml fileName="leakdetectordebug.xml" at="LeakDetector"/>
    </additional>
</configuration>


Original file leakdetectordebug.xml.
<?xml version="1.0" encoding="UTF-8"?>
<LeakDetector>
    <ConcurrentListeners>
        <ConcurrentListener>
            <Port>5000</Port>
            <LeakListeners>
                <LeakListener>
                    <TopicName>q_atmos_slc1</TopicName>
                    <TopicOwner>leak</TopicOwner>
                    <SubscriberName>LeakDetector</SubscriberName>
                    <UserId>xxxxx</UserId>
                    <Password>xxxxxx</Password>
                    <dbUrl>jdbc:oracle:thin:@x.x.x.x:1521:xxxxxxx</dbUrl>
                </LeakListener>
                <LeakListener>
                    <TopicName>q_atmos_slc2</TopicName>
                    <TopicOwner>leak</TopicOwner>
                    <SubscriberName>LeakDetector</SubscriberName>
                    <UserId>xxxx</UserId>
                    <Password>xxxxxxx</Password>
                   <dbUrl>jdbc:oracle:thin:@x.x.x.x:1521:xxxxxxx</dbUrl>
                </LeakListener>
            </LeakListeners>
        </ConcurrentListener>
    </ConcurrentListeners>
</LeakDetector>

File from ConfigurationXMLDocument.write

?xml version="1.0" encoding="UTF-8"?>
<config>
  <LeakDetector>
    <ConcurrentListeners>
      <ConcurrentListener>
        <LeakListeners>
          <LeakListener>
            <dbUrl>jdbc:oracle:thin:@x.x.x.x:1521:pdlocal</dbUrl>
            <dbUrl>jdbc:oracle:thin:@x.x.x.x:1521:pdlocal</dbUrl>
            <TopicName>q_atmos_slc1</TopicName>
            <TopicName>q_atmos_slc2</TopicName>
          </LeakListener>
        </LeakListeners>
        <Port>5000</Port>
        <LeakListeners>
          <LeakListener>
            <Password>xxxx</Password>
            <Password>xxxxx</Password>
            <TopicOwner>leak</TopicOwner>
            <TopicOwner>leak</TopicOwner>
            <UserId>xxxxx</UserId>
            <UserId>xxxxx</UserId>
            <SubscriberName>LeakDetector</SubscriberName>
            <SubscriberName>LeakDetector</SubscriberName>
          </LeakListener>
        </LeakListeners>
      </ConcurrentListener>
    </ConcurrentListeners>
  </LeakDetector>
</config>

---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]

Reply via email to