Main.java Source code

Java tutorial

Introduction

Here is the source code for Main.java

Source

//package com.java2s;
/*******************************************************************************
 * Copyright Duke Comprehensive Cancer Center and SemanticBits
 * 
 * Distributed under the OSI-approved BSD 3-Clause License.
 * See http://ncip.github.com/c3pr/LICENSE.txt for details.
 ******************************************************************************/

import java.util.ArrayList;
import java.util.List;

import org.w3c.dom.NamedNodeMap;
import org.w3c.dom.Node;

public class Main {
    private static List<Node> filterOutIgnorableAttrs(NamedNodeMap map) {
        List<Node> list = new ArrayList<Node>();
        for (int i = 0; i < map.getLength(); i++) {
            Node attr = map.item(i);
            if (!attr.getNodeName().startsWith("xmlns") && !"xsi:type".equals(attr.getNodeName())) {
                list.add(attr);
            }
        }
        return list;
    }
}