private ArrayList<XmlAttribute> getNSDecls(boolean updateModCount) {
        final ArrayList<XmlAttribute> list = new ArrayList<>(Arrays.asList(myRootTag.getAttributes()));
        final Iterator<XmlAttribute> it = list.iterator();
        while (it.hasNext()) {
            final XmlAttribute attribute = it.next();
            if (!attribute.isNamespaceDeclaration() || !attribute.isValid()) it.remove();
            if (updateModCount) {
                attribute.putUserData(MOD_COUNT, myFile.getModificationStamp());
            }
        }
        return list;
    }
private ArrayList<XmlAttribute> getNSDecls(boolean updateModCount)