Code example for NodeList

Methods: getLengthitem

0
 
public class Transformers { 
	@Transformer(from = "{urn:org.switchyard.tools.tests:wiring-validation-tests:0.0.1-SNAPSHOT}testInOutMethod") 
	public static String transform(Element from) {
		NodeList strings = from.getElementsByTagName("string");
		if (strings == null || strings.getLength() == 0) {
			return null; 
		} 
		return ((Element) strings.item(0)).getTextContent();
	} 
 
} 
Contextual code suggestions in your IDE  Get Codota for Java