mEU CODIGO ESTA ASSIM MAS N ESTOU CONSIGUINDO
DocumentBuilderFactory docBuilderFactory = DocumentBuilderFactory
.newInstance();
DocumentBuilder docBuilder = null;
try {
docBuilder = docBuilderFactory.newDocumentBuilder();
} catch (ParserConfigurationException e) {
e.printStackTrace();
}
Document doc = docBuilder.newDocument();
Element span = doc.createElement("span");
Element labelUF = doc.createElement("label");
Element selectUF = doc.createElement("select");
if (parameters.get("label") != null) {
labelUF.setTextContent((String) parameters.get("label"));
} else {
labelUF.setTextContent("Estado: ");
}
selectUF.setAttribute("option", "Teste");
selectUF.setAttribute("option", "Teste2");
selectUF.setAttribute("option", "Teste3");
doc.appendChild(span);
span.appendChild(labelUF);
span.appendChild(selectUF);
return span;
}