解析XML具有属性

问题描述:

<content type="xhtml"> 

     <apxh:div> 
      <apxh:p>xyz</apxh:p> 
      <apxh:p>xyz</apxh:p> 
      <apxh:p>xyz</apxh:p> 
      <apxh:p>xyz</apxh:p> 
      <apxh:p>xyz</apxh:p> 

     </apxh:div> 
    </content> 

我能够得到“XHTML”目前在按类型,解析XML具有属性

 item.getChild(url,CONTENT).setStartElementListener(new StartElementListener() { 

     @Override 
     public void start(Attributes attributes) { 
     str=attributes.getValue("type"); 


     } 
    }); 
    item.getChild(url,CONTENT).setEndElementListener(new EndElementListener() { 

     @Override 
     public void end() { 
      currentMessage.setType(str); 

     } 
    }); 

现在,我如何能得到“apxh:格”,因为它是由分离“ :“?

谢谢。

我认为你需要解析它以进行SOAP解析。 ur xml的标记模式表明,使用soap解析 肯定会帮你...

+0

实际上它是一个atom feed解析。 – zaiff

+0

尝试SOAP解析,一般肥皂解析有这种模式,你有.... – Richa