private void removeNodes ( String xpathExpression , Document domdoc ) { List < Node > nodes = domdoc . selectNodes ( xpathExpression ) ; for ( Node node : nodes ) { node . detach ( ) ; } }
Remove the nodes found with the xpath expression .