i have difficulties parsing this structure xml:
<Publications>
<Publication>
<PublicationID>1</PublicationID>
<PublisherID>1</PublisherID>
<Date>2012-03-28 13:39:04</Date>
</Publication>
<Publication>
<PublicationID>2</PublicationID>
<PublisherID>1</PublisherID>
<Date>2012-01-23 10:00:03</Date>
</Publication>
</Publications>
Maybe some one could give me some ides how to parse it ?
My request looks:
String method_name = "GetPublications";
// creating new SoapObject
soap = GetSoapObject(method_name);
SoapSerializationEnvelope envelope = GetEnvelope(soap);
HttpTransportSE androidHttpTransport = new HttpTransportSE(REQUEST_URL);
androidHttpTransport.call(NAMESPACE + method_name, envelope);
soap = (SoapObject) envelope.getResponse();
kSoap2-Android is returning:
anyType{Publications=anyType{Publication=anyType{PublicationID=1; PublisherID=1; Date=2012-03-28 13:39:04; }; Publication=anyType{PublicationID=2; PublisherID=1; Date=2012-01-23 10:00:03; }; }; }
Thanks.
Parsing the xml file like:
Step1: Creating class java bean like:
Step2: using KSOAP2 to implement what you think by Using :
Hope it will be useful for you.