/**
* 节点为空就X
*
* @param doc
* type: Document, DOM;
* @param param
* type: BizContext;
* @return: int ,运算逻辑返回值,如果失败返回0,成功返回1
* @throws Exception
* <p> ** bizlet 的显示名称 **
* @bizlet_displayName BL_ObjectTrim
* @bizlet_param passing="in_out" type="EOSEntity" value="/" name="" desc=""
*/
public static int BL_ObjectTrim(Document doc, BizContext param)
throws Exception {
Node param0 = (Node) param.getParaObjectAt(0);
NodeList nodes = param0.getChildNodes();
int returnCode = 0;
for (int i = 0; i < nodes.getLength(); i++) {
Node currentNode = nodes.item(i);
// String nodeValue = XmlUtil.getNodeValue(currentNode);
String nodeValue =(String) currentNode.getFirstChild().getNodeValue();
System.out.println( nodeValue + "~~~~~~~~~~~~~~~~~");
if (nodeValue.trim().length() == 0) {
param0.removeChild(currentNode);
returnCode++;
}
}
System.out.println("共X掉"+returnCode + "~~~~~~~~~~~~~~~~~");
return returnCode;
}
}