How to fetch value from xml in Springboot java -


my xml contains <list><came cameid="cam-1" camename="came 1"></list> here want how fetch cameid in java class

you can use xstream jar write code

xstream xstream = new xstream(); (java object name) xstream.fromxml(new classpathresource("location of xml file ").getfile()); 

variable name should same in both java object , xml file.

hope :)


Comments

Popular posts from this blog

angular - Ionic slides - dynamically add slides before and after -

minify - Minimizing css files -

Add a dynamic header in angular 2 http provider -