Code example for NodeList

Methods: getLength, item

0
 
        // Check to see if the image file is hidden by a sampler surface link combo 
        Element sampler = mDom.getElementById(samplerName);
        if (sampler != null) {
            NodeList nl = sampler.getElementsByTagName("source");
            if (nl != null && nl.getLength() == 1) {
                Element ref = (Element)nl.item(0);
                String surfaceName = getString(ref);
                if (surfaceName == null) {
                    return null; 
                } 
 
                Element surface = mDom.getElementById(surfaceName);
                if (surface == null) {
                    return null; 
                } 
                nl = surface.getElementsByTagName("init_from");
                if (nl != null && nl.getLength() == 1) {
                    ref = (Element)nl.item(0);
                    texName = getString(ref);
                }