Best code examples for Java 8 NodeList class (org.w3c.dom.NodeList)

These code examples were ranked by Codota’s semantic indexing as the best open source examples for Java 8 NodeList class.
You can now enable Codota on your own code to easily search and navigate your Java codebase.

Java 8 NodeList examples from Open Source projects
This code example shows how to use the following methods: getLength, item
27:	if ( nodeList.getLength() == 0 ) 
-
34:	element = ( Element ) nodeList.item( 0 ); 
Full Snippet Info
9
CodeRank
This code example shows how to use the following methods: getLength, item
77:	assertEquals(2, items.getLength()); 
78:	checkItem(items.item(0), "MyNewPage", "me", rfcDate, "me:" + rfcDate, "http://" + hostName + "/MyNewPage"); 
79:	checkItem(items.item(1), "SomeOtherPage", null, rfcDate, rfcDate, "http://" + hostName + "/SomeOtherPage"); 
Full Snippet Info
8
CodeRank
This code example shows how to use the following methods: item
52:	Element line = (Element) id.item(0); 
Full Snippet Info
8
CodeRank
This code example shows how to use the following methods: getLength, item
553:	if(nodeList.getLength() < 1) { 
-
557:	Node node = nodeList.item(0); 
Full Snippet Info
8
CodeRank
This code example shows how to use the following methods: getLength
77:	assertEquals("throw_Size", 36, newList.getLength()); 
Full Snippet Info
7
CodeRank
This code example shows how to use the following methods: getLength
63:	for (int i = 0; i < childNodes.getLength(); i++) { 
Full Snippet Info
7
CodeRank
This code example shows how to use the following methods: getLength, item
297:	if (nl != null && nl.getLength() == 1) { 
298:	ref = (Element)nl.item(0); 
Full Snippet Info
8
CodeRank
This code example shows how to use the following methods: item
300:	assertEquals(msg, expected, node.item(0).getNodeValue()); 
Full Snippet Info
7
CodeRank
This code example shows how to use the following methods: item
172:	testAddr = elementList.item(0); 
Full Snippet Info
7
CodeRank
This code example shows how to use the following methods: getLength, item
285:	if (nl != null && nl.getLength() == 1) { 
286:	Element ref = (Element)nl.item(0); 
Full Snippet Info
7
CodeRank
This code example shows how to use the following methods: getLength, item
138:	if(nl != null && nl.getLength() > 0){ 
139:	result = new XmlDom((Element) nl.item(0)); 
Full Snippet Info
8
CodeRank
This code example shows how to use the following methods: getLength, item
99:	nodeListControl.expectAndDefaultReturn(mockNodeList.getLength(), 6); 
100:	mockNodeList.item(0); 
-
102:	mockNodeList.item(1); 
-
104:	mockNodeList.item(2); 
-
106:	mockNodeList.item(3); 
-
108:	mockNodeList.item(4); 
-
110:	mockNodeList.item(5); 
-
118:	elementControl.expectAndDefaultReturn(mockElement.getChildNodes(), mockNodeList); 
Full Snippet Info
7
CodeRank
This code example shows how to use the following methods: getLength
62:	if (beanNodeList.getLength() > maxBeanCount) { 
Full Snippet Info
7
CodeRank
This code example shows how to use the following methods: getLength, item
46:	assertEquals(1, textareas.getLength()); 
47:	assertEquals(hudson.getSystemMessage(),textareas.item(0).getTextContent()); 
Full Snippet Info
7
CodeRank
This code example shows how to use the following methods: getLength
21:	assertEquals(1, elements.getLength()); 
Full Snippet Info
7
CodeRank
This code example shows how to use the following methods: getLength
85:	assertTrue(l == null || l.getLength() == 0); 
Full Snippet Info
7
CodeRank
This code example shows how to use the following methods: getLength, item
105:	if(l != null && l.getLength() == 1) 
106:	return l.item(0); 
Full Snippet Info
7
CodeRank
This code example shows how to use the following methods: getLength
48:	return current < nodeList.getLength(); 
Full Snippet Info
7
CodeRank
This code example shows how to use the following methods: getLength, item
84:	assertEquals(1, result.getLength()); 
85:	Node n = result.item(0); 
Full Snippet Info
7
CodeRank
This code example shows how to use the following methods: item
172:	testAddr = elementList.item(0); 
Full Snippet Info
7
CodeRank
This code example shows how to use the following methods: getLength
78:	if( nodes != null && nodes.getLength() > 0 ) { return new LayerDrawable( null ); } 
Full Snippet Info
7
CodeRank
This code example shows how to use the following methods: getLength, item
128:	if (failureElements.getLength() > 0) { 
129:	Element failureElement = (Element) failureElements.item(0); 
Full Snippet Info
7
CodeRank
This code example shows how to use the following methods: getLength
74:	if (tagNode.getLength() == 0) { 
Full Snippet Info
7
CodeRank
This code example shows how to use the following methods: getLength, item
125:	if (nodelist.getLength() > 0) { 
126:	Node node = nodelist.item(0).getFirstChild(); 
Full Snippet Info
7
CodeRank
This code example shows how to use the following methods: getLength, item
47:	assertEquals(1, features.getLength()); 
-
49:	Element feature = (Element) features.item(0); 
Full Snippet Info
7
CodeRank
This code example shows how to use the following methods: getLength
351:	for (int i = 0; i < props.getLength(); i++) { 
Full Snippet Info
7
CodeRank
This code example shows how to use the following methods: getLength
53:	assertEquals("There should be exactly 1 <cluster> element", 1, clusterNodes.getLength()); 
Full Snippet Info
7
CodeRank
This code example shows how to use the following methods: getLength, item
69:	if (nodeList == null || nodeList.getLength() == 0) 
-
72:	Node node = nodeList.item(0); 
Full Snippet Info
7
CodeRank
This code example shows how to use the following methods: getLength, item
47:	assertEquals( 1, features.getLength() ); 
-
49:	assertEquals(features.item(0).getAttributes().getNamedItem("gml:id").getNodeValue(), "fid1"); 
Full Snippet Info
7
CodeRank
This code example shows how to use the following methods: getLength, item
48:	assertEquals( 1, features.getLength() ); 
-
50:	assertEquals(features.item(0).getAttributes().getNamedItem("gml:id").getNodeValue(), "fid1"); 
Full Snippet Info
7
CodeRank
This code example shows how to use the following methods: getLength, item
21:	if (strings == null || strings.getLength() == 0) { 
-
24:	return ((Element) strings.item(0)).getTextContent(); 
Full Snippet Info
7
CodeRank
This code example shows how to use the following methods: getLength, item
74:	Assert.assertEquals(1,formatNodes.getLength()); 
75:	Assert.assertEquals(getMapFormat.getMimeType(),formatNodes.item(0).getTextContent()); 
Full Snippet Info
7
CodeRank
This code example shows how to use the following methods: getLength, item
84:	assertEquals("nodes = 2", 2, nl.getLength()); 
-
89:	Element attrib = (Element) nl.item(0); 
Full Snippet Info
7
CodeRank
This code example shows how to use the following methods: getLength, item
91:	if(nodes.getLength() == 0) { 
-
94:	return (Element) nodes.item(0); 
Full Snippet Info
7
CodeRank
This code example shows how to use the following methods: getLength, item
85:	Assert.assertEquals(1,formatNodes.getLength()); 
86:	Assert.assertEquals(getMapFormat.getMimeType(),formatNodes.item(0).getTextContent()); 
Full Snippet Info
7
CodeRank
This code example shows how to use the following methods: getLength, item
300:	if (nodeList.getLength() > 0) { 
301:	return (Element) nodeList.item(0); 
Full Snippet Info
7
CodeRank
This code example shows how to use the following methods: getLength, item
74:	if (nodes != null && nodes.getLength() == 1) { 
75:	Node c = nodes.item(0).getFirstChild(); 
Full Snippet Info
7
CodeRank
This code example shows how to use the following methods: getLength, item
68:	if (nodes.getLength() < 1) { 
-
71:	Element childElement = (Element)nodes.item(0); 
Full Snippet Info
7
CodeRank
This code example shows how to use the following methods: getLength, item
58:	int len = list.getLength(); 
59:	return len == 0 ? null : list.item(0); 
Full Snippet Info
7
CodeRank
This code example shows how to use the following methods: getLength, item
69:	if (nodes.getLength() < 1) { 
-
72:	Element childElement = (Element)nodes.item(0); 
Full Snippet Info
7
CodeRank
This code example shows how to use the following methods: getLength, item
130:	if (nodelist.getLength() > 0) { 
131:	Node node = nodelist.item(0).getFirstChild(); 
Full Snippet Info
7
CodeRank
This code example shows how to use the following methods: getLength, item
143:	if ((nodeList != null) && (nodeList.getLength() > 0)) { 
144:	String kickoff = nodeList.item(0).getTextContent(); 
Full Snippet Info
7
CodeRank
This code example shows how to use the following methods: getLength, item
63:	assertEquals(1, queueNodes.getLength()); 
64:	deployer.deploy(queueNodes.item(0)); 
Full Snippet Info
7
CodeRank
This code example shows how to use the following methods: getLength, item
187:	if (nodes.getLength() > 0) { 
188:	Node node = nodes.item(0); 
Full Snippet Info
7
CodeRank
This code example shows how to use the following methods: getLength, item
124:	if (nodelist.getLength() > 0) { 
125:	Node node = nodelist.item(0).getFirstChild(); 
Full Snippet Info
7
CodeRank
This code example shows how to use the following methods: getLength, item
46:	if (nl.getLength() > 0) 
-
48:	double val = XMLUtil.parseDouble(nl.item(0)); 
Full Snippet Info
7
CodeRank
This code example shows how to use the following methods: getLength, item
189:	assertEquals(1, legendURLs.getLength()); 
190:	Element legendURL = (Element) legendURLs.item(0); 
Full Snippet Info
7
CodeRank
This code example shows how to use the following methods: getLength, item
49:	if (nl.getLength() > 0) { 
50:	description = nl.item(0).getTextContent(); 
Full Snippet Info
7
CodeRank
Related Java 8 NodeList Questions & Answers:
Other Java 8 NodeList Examples
1:		NodeList n = item.getElementsByTagName(str);		
2:		return this.getElementValue(n.item(0));
3:	}

Read More

28:	
29:						NodeList nl = doc.getElementsByTagName(KEY_ITEM);
30:						// looping through all item nodes <item>
31:						for (int i = 0; i < nl.getLength(); i++) {
32:							// creating new HashMap

Read More

10:	Document doc = parser.getDomElement(xml); // getting DOM element
11:	
12:	NodeList nl = doc.getElementsByTagName(KEY_ITEM);
13:	
14:	// looping through all item nodes <item>

Read More

See Code Examples for Java 8 NodeList Methods: