2011-09-29 6 views
2
 <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> 

속성을 갖는 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 : div"를 ":"로 구분하여 어떻게 구할 수 있습니까?

고맙습니다.

답변

1

SOAP 파싱을 위해 구문 분석해야한다고 생각합니다. ur Xml의 태그 패턴을 보면 비누 구문 분석 을 사용해보십시오.

+0

실제로 원자 피드 파싱입니다. – zaiff

+0

SOAP 구문 분석을 시도합니다. 일반적으로 SOAP 구문 분석에는 다음과 같은 패턴이 있습니다. – Richa

관련 문제