Hello, humans.
I have a question regarding something I am trying to do… I am trying to GET an XML document from a remote server (which I can do), and then attach that as if it was a datasource and edit it locally, and then POST the results.
I can GET and post files, but I seem to have difficulty attaching the results from the GET as if they were a dataset… in other words, I can do this:
form.setDataSource(hostmapDS);
In hostmapDS:
…define fields…
setID(id);
setRecordXPath(“//OTA”);
DataSourceTextField hostAddressField = new DataSourceTextField(
“hostAddress”, “hostAddress”, 128);
hostAddressField.setValueXPath(“../../@address”);
DataSourceTextField hostPortField = new DataSourceTextField(“hostPort”,
“hostPort”, 128);
hostPortField.setValueXPath(“../../@port”);
… etc…
setDataURL(“ds/test_data/hostmap.xml”);
But I want to do a GET and grab the resulting xml in a String s, and then say:
setDataURL(s);
Can I GET the data, tie my data to an in-memory source, edit it locally, and then POST the results?