I’d like to read in an XML response and make a temp file in memory out of the xml.
Then, I’d like to read in the file to see if certain elements exist.
After this is done, I’d like to just get rid of the temp file.
I am familiar with making and reading files to/from the file system, is it possible to not write, and then read, from a file in memory only?
I’d like to read in an XML response and make a temp file in
Share
Why would you bother creating it as a “file” in memory? Just keep it as an XML representation (whether that’s using JDOM, the W3C DOM API or whatever).
It will be a lot simpler to examine in that format than as a “file” in memory. After all, if you had the serialized form of it, as it would appear on disk, then in order to query it you’d basically have to parse it again anyway!