1

My program takes xml layout as string from web server. Can I convert this string to view and add to layout ?

For example :

String xml = "<xml code>";
View view = //parse this xml code to view;
layout.add(view);
Kushal
  • 8,100
  • 9
  • 63
  • 82
  • 1
    There is no direct way or api to convert xml to view, you will have to manually parse xml and reciprocate to view. Having said this you can find third party libraries I guess to convert from xml to view. – Shadow Droid Dec 27 '19 at 04:56
  • You can use webview and you can render your xml to webview if you have html tags – Nik Dec 27 '19 at 05:01
  • Try this https://stackoverflow.com/a/12954755/2308683 – OneCricketeer Dec 27 '19 at 05:18

0 Answers0