Welcome!

Welcome to the official BlackBerry Support Community Forums.

This is your resource to discuss support topics with your peers, and learn from each other.

inside custom component

Java Development

Reply
Developer
Posts: 436
Registered: ‎06-22-2010
My Device: na
My Carrier: blackberry developer

End node dtermination

Using DOM Parsing.how to dtermine whether a node has ended?

My XML is below 

<?xml version="1.0" encoding="UTF-8"?>
<app
    id="MagicBox"
    homeid="home"
    version="1.0.0" >

    <page id="home" width="100%" height="100%" scroll="true" transition="left">
    	
    <vbox
                id="article4_item4"
                bgcolor="#090101"
                height="100%"
                onclick="article4_item4"
                width="100%" >
		 <vbox
                 bgcolor="#0000ff"
                height="50%"
                onclick="article4_item4"
                width="50%" >
         <vbox
                id="article4_item4"
                bgimage="images/article4_image4.jpg"
                height="40%"
                onclick="article4_item4"
                width="50%" >
                </vbox>	
		<vbox
                id="article4_item4"
                bgimage="images/article2_image1.jpg"
                height="40%"
                onclick="article4_item4"
                width="50%" >
                </vbox>	
		</vbox>
<vbox
                id="article4_item4"
                bgimage="images/article1_image1.jpg"
                height="40%"
                onclick="article4_item4"
                width="50%" >
                </vbox>	
      </vbox>
    </page>

</app>

 I want to perform some action when 2nd VBOX has ended.How to knwo that my 2nd VBOX has ended

Developer
Posts: 152
Registered: ‎07-28-2011
My Device: Bold 9900
My Carrier: MTN

Re: End node dtermination

You should be able to check the number of child nodes under the "page" node and keep an index of which node you've gone through to test for when you should exceute whatever it is that you want to do.