private synchronized static void removeChildCharacterData(Node node,boolean deep){
  NodeList list=node.getChildNodes();
  for (int i=list.getLength(); i >= 0; i--) {
    Node n=list.item(i);
    if (n == null)     continue;
    if (n instanceof CharacterData)     node.removeChild(XMLCaster.toRawNode(n));
 else     if (deep)     removeChildCharacterData(n,deep);
  }
}

private synchronized static void removeChildCharacterData ( Node node , boolean deep ) { NodeList list = node . getChildNodes ( ) ; for ( int i = list . getLength ( ) ; i >= 0 ; i -- ) { Node n = list . item ( i ) ; if ( n == null ) continue ; if ( n instanceof CharacterData ) node . removeChild ( XMLCaster . toRawNode ( n ) ) ; else if ( deep ) removeChildCharacterData ( n , deep ) ; } }
remove children from type characterdata from a node , this includes text , comment and cdatasection nodes
