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

javascript - WinJS appendTextAsync producing scheduler errors -

minify - Minimizing css files -

Sockets with kotlin -