src/main/java/com/itfsw/mybatis/generator/plugins/utils/XmlElementTools.java
public static Attribute getAttribute(XmlElement element, String name) {
        Iterator<Attribute> iterator = element.getAttributes().iterator();
        while (iterator.hasNext()) {
            Attribute attribute = iterator.next();
            if (attribute.getName().equals(name)) {
                return attribute;
            }
        }
        return null;
    }
public static Attribute getAttribute(XmlElement element, String name) {
        Iterator<Attribute> iterator = element.getAttributes().iterator();
        while (iterator.hasNext()) {
            Attribute attribute = iterator.next();
            if (attribute.getName().equals(name)) {
                return attribute;
            }
        }
        return null;
    }
获取属性
@param element
@param name