public static String parse()

in core/src/main/java/com/alibaba/smart/framework/engine/bpmn/assembly/task/parser/ClassNameWorkAroundUtil.java [12:46]


    public static String parse(XMLStreamReader reader){
        //no need add namespaceUri ,or using reader.getAttributeValue(2) (not good),see http://www.saxproject.org/namespaces.html,
        // http://stackoverflow.com/questions/7157355/what-is-the-difference-between-localname-and-qname,http://stackoverflow.com/questions/6390339/how-to-query-xml-using-namespaces-in-java-with-xpath


        //xml bug https://java.net/jira/browse/SJSXP-63 ,XML 解析有bug,所以这里兼容下。

        String className0 = reader.getAttributeValue(null,"class");
        if(null != className0){
            return  className0;
        }

        String className4 =   reader.getAttributeValue("","class");
        if(null != className4){
            return  className4;
        }

        String className3 =   reader.getAttributeValue(SmartBase.SMART_NS,"class");
        if(null != className3){
            return  className3;
        }

        String className1 = reader.getAttributeValue("smart","class");
        if(null != className1){
            return  className1;
        }


//        String className2 =   reader.getAttributeValue(2);
//        QName qName= reader.getAttributeName(2);
//        String namespaceURI =   qName.getNamespaceURI();
//        String localPart =  qName.getLocalPart();
//        String prefix  =  qName.getPrefix();
        return null;
    }