SAX parsing - efficient way to get text nodes

后端 未结 2 1775
轮回少年
轮回少年 2020-12-30 11:35

Given this XML snippet



   
      Gambardella, Matthew
         


        
2条回答
  •  旧时难觅i
    2020-12-30 12:14

    public void startElement(String strNamespaceURI, String strLocalName,
          String strQName, Attributes al) throws SAXException {
           if(strLocalName.equalsIgnoreCase("HIT"))
           {
                String output1 = al.getValue("NAME");
              //this will work but how can we parse if NAME="abc" only     ?
           }
    
       }
    

提交回复
热议问题