오늘 내 질문에 대해서는 가까운 상대 및/또는 동등한 경우 java
에 ksoap2
- 라이브러리를 사용하여 요소별로 구문 분석 할 수 있는지 궁금합니다.kostap2는 didStart/didEndElement와 동일합니까?
예를 들어 objective-c
에서 :
public void didEndElement(args....){
if occurring element is thisElement
//do something with the value in the element
}
public void didStartElement(args....){
if occurring element is thisElement
//do something with the value in the element
}
동안 java
SoapObject foo = (SoapObject)bar.getProperty(enum);
aString = foo.getProperty(enum);
aNotherString = foo.getProperty(anotherEnum);
이 그래서, 기본적으로, 우리가하고 싶은 것은
에서
즉석 java
구문 :
if(currentElement == "myElement")
aVar = valueInElement;
// or
a[1] = valueInElement;
나는이 점에 대해 많은 것을 알고 있을지도 모른다. 그러나 이것에 대한 정보를 어디에서 얻을 수 있는지에 대한 모든 조언이나 힌트는 전혀 없다.
이 링크는 더 좋은 예일 수 있습니다. http://www.jondev.net/articles/Android_XML_SAX_Parser_Example – Bart
다른 종류의 솔루션으로이 문제를 해결했지만 성공한 대답이 유일한 답변 이었으므로, 올바른 것으로 표시하겠습니다. 응답 해 주셔서 감사합니다. – doge