Here you can find the source of countNonNamespaceAttribures(NamedNodeMap attrs)
private static int countNonNamespaceAttribures(NamedNodeMap attrs)
//package com.java2s; /*// w w w . j av a 2 s . co m * @(#) NamespaceResolver.java 1.1 14/8/2016 * * Copyright (c) Provenance Intelligence Consultancy Limited. * * This software is the confidential and proprietary information of * Provenance Intelligence Consultancy Limited. You shall not * disclose such Confidential Information and shall use it only in * accordance with the terms of the license agreement you entered into * with Provenance Intelligence Consultancy Limited. */ import org.w3c.dom.Attr; import org.w3c.dom.NamedNodeMap; public class Main { private static int countNonNamespaceAttribures(NamedNodeMap attrs) { int n = 0; for (int i = 0; i < attrs.getLength(); i++) { Attr attr = (Attr) attrs.item(i); if (!attr.getName().startsWith("xmlns")) { n++; } } return n; } }