Code example for Node

Methods: appendChildsetTextContent

0
		subElementAttributes.setNamedItem(createAttribute(document, "name", ""));
		subElementAttributes.setNamedItem(createAttribute(document, "elementType", "Header"));
		collectionProp.appendChild(subElementProp);
		appendTypeProp(document, subElementProp, "stringProp", "Header.name", "Content-type");
		appendTypeProp(document, subElementProp, "stringProp", "Header.value", "application/json");
		elementProp.setTextContent(null);
		elementProp.appendChild(collectionProp);
	} 
	 
	private static void appendElementProp(Document document, Node parentNode, String contextType, String contextPostData) { // eleme prop
		Node elementProp = document.createElement("elementProp");
		NamedNodeMap attributes = elementProp.getAttributes();
 
		attributes.setNamedItem(createAttribute(document, "name", "HTTPsampler.Arguments"));
		attributes.setNamedItem(createAttribute(document, "elementType", "Arguments"));
		attributes.setNamedItem(createAttribute(document, "guiclass", "HTTPArgumentsPanel"));
		attributes.setNamedItem(createAttribute(document, "testclass", "Arguments"));
		attributes.setNamedItem(createAttribute(document, "testname", "User Defined Variables"));
		attributes.setNamedItem(createAttribute(document, "enabled", "true"));
		appendCollectionProp(document, elementProp, contextType, contextPostData);
Contextual code suggestions in your IDE  Get Codota for Java