Click here to Skip to main content
15,913,836 members
Please Sign up or sign in to vote.
0.00/5 (No votes)
See more:
hi all
i retrieve data XML string from c# webservice using android
but how can i get value for each element in XML

this is my output result on android

{"NewNews":1,"name":["werr","we"],"DateUp":["7/1/2019 12:00:00 AM","6/12/2019 12:00:00 AM"]}


What I have tried:

super.onCreate(savedInstanceState);
        setContentView(R.layout.activity_main);
        StrictMode.ThreadPolicy policy = new StrictMode.ThreadPolicy.Builder().permitAll().build();

        StrictMode.setThreadPolicy(policy);
        SoapObject request = new SoapObject(NAMESPACE, METHOD_NAME);

        SoapSerializationEnvelope envelope = new SoapSerializationEnvelope(SoapEnvelope.VER11);
        envelope.dotNet = true;
        envelope.setOutputSoapObject(request);
        HttpTransportSE androidHttpTransport = new HttpTransportSE(URL);

        try {
            androidHttpTransport.call(SOAP_ACTION, envelope);
            SoapPrimitive response = (SoapPrimitive)envelope.getResponse();



            TextView tv = new TextView(this);
            tv.setText(response.toString());
            setContentView(tv);

        } catch (Exception e) {
            e.printStackTrace();
        }
Posted
Updated 19-Jun-19 5:11am
Comments
David Crow 18-Jun-19 11:42am    
Have you tried Googling for "XmlDocument C#"

1 solution

 
Share this answer
 

This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)



CodeProject, 20 Bay Street, 11th Floor Toronto, Ontario, Canada M5J 2N8 +1 (416) 849-8900