From: Anton Tagunov [AT]

AT> How do I create the following structure?

AT> <a>
AT>    <b>1</b>
AT>    <b>2</b>
AT> </a>

AT> No way to do it.

From: Leo Sutic [LSU]

LSU> addChild(Configuration config)

Hold on for a second!
Will my code look like this?

/**
 * This method adds two child configuration nodes
 *
 *   <b>1</b>
 *   <b>2</b>
 *
 * to the configuration node <code>node</code>
 *
 * @param node the node to add two new sub-nodes to
 */
void amendConfig( final MutableConfiguration node )
{
    final DefaultConfiguration b1 = new DefaultConfiguration( "b" );
    b1.setValue( 1 );
    final DefaultConfiguration b2 = new DefaulcConfiguration( "b" );
    b2.setValue( 2 );
    node.addChild( b1 );
    node.addChild( b2 );
}

And I thought we would got rid of the dependency on DefaultConfiguration!

Anton

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

Reply via email to