src/util/xml-helpers.js
function(doc, nodes, selector) {
        var parent = module.exports.resolveParent(doc, selector);
        if (!parent) return false;

        nodes.forEach(function (node) {
            var matchingKid = null;
            if ((matchingKid = findChild(node, parent)) !== null) {
                // stupid elementtree takes an index argument it doesn't use
                // and does not conform to the python lib
                parent.remove(matchingKid);
            }
        });

        return true;
    }
function(doc, nodes, selector) {
        var parent = module.exports.resolveParent(doc, selector);
        if (!parent) return false;

        nodes.forEach(function (node) {
            var matchingKid = null;
            if ((matchingKid = findChild(node, parent)) !== null) {
                // stupid elementtree takes an index argument it doesn't use
                // and does not conform to the python lib
                parent.remove(matchingKid);
            }
        });

        return true;
    }
function ( doc , nodes , selector ) { var parent = module . exports . resolveParent ( doc , selector ) ; if ( ! parent ) return false ; nodes . forEach ( function ( node ) { var matchingKid = null ; if ( ( matchingKid = findChild ( node , parent ) ) !== null ) { // stupid elementtree takes an index argument it doesn't use // and does not conform to the python lib parent . remove ( matchingKid ) ; } } ) ; return true ; }
removes node from doc at selector
removes node from doc at selector