private static IIOMetadataNode getOrCreateChildNode ( IIOMetadataNode parentNode , String name ) { NodeList nodeList = parentNode . getElementsByTagName ( name ) ; if ( nodeList . getLength ( ) > 0 ) { return ( IIOMetadataNode ) nodeList . item ( 0 ) ; } IIOMetadataNode childNode = new IIOMetadataNode ( name ) ; parentNode . appendChild ( childNode ) ; return childNode ; }
Gets the named child node or creates and attaches it .