I have been away from java for some time (10 yrs), and have looked around for a way to:
- submit a legal/perfect XML formatted 'response' as a template (abstract the values) or as is w/ values retained, but all strings.
- step 1--get from that a depth #, to allow you to submit the appropriate type variable(s)
- step 2--submit the XML w/ appropriate variables, w/ output being a fully parsed out XML with filled in supplied variables and even java data classes &/or with java getters/setters for same, actual code.
- step 3-- or numerous calls to get various bits of data/code from the lib.
but a friend says no such thing exists, maybe jackson is the best solution, i have not seen a solution like i desire either.
this seems such an almost obvious general problem that some set of libraries or a smart editor or something should help automate such a tedious and fairly brainless problem-parsing XML messages.
XML formatting is so hard structured that this seems like a gimme problem to solve, or maybe i am missing something ?
ps: if you care, this is for a TDAmeritrade stock trading app, you speak regular POST/GET on input, but it responds w/ many diff XML responses (& possible ERRORS) and the XML size can be enormous if you are asking for say 100+ stock quotes (but redundant of course), so somewhat non-trival, but XML is so damn tedious & ZERO satisfaction quotient when done !!
pps: i do not want to spend much time on this, hoping for some automation, as the TDA api is supposed to change soon to using json, so the XML stuff will only be short lived, i ASSume.
Thanks for a delightful answer/solution !!