Main.java Source code

Java tutorial

Introduction

Here is the source code for Main.java

Source

//package com.java2s;

import org.w3c.dom.Node;

public class Main {
    /**
     * Removes the given attribute from the node
     * @param doc
     * @param node
     * @param attrName
     */
    public static void removeAttr(Node node, String attrName) {
        if (node.getAttributes().getNamedItem(attrName) != null)
            node.getAttributes().removeNamedItem(attrName);
    }
}