I need to feed XML data into a system as part of a test script.
The test script itself is a shell script.
The XML data contains timestamps in attributes, which need to be close to current time. (In fact, there are two timestamps, one around current time and the other between a few minutes and a few hours into the future.) The rest of the data is static (i.e. there is a set of different XML files, one per test case).
I was thinking of addressing this by using external entities, then generating the entity definition via a script. Problem: the consumer system supports only a subset of XML (relying on the glib XML parser).
Thus my next idea was to run the XML through a parser that will resolve external entities and output flat-file XML with all entities and inclusions expanded. Are any such parsers available as command-line tools (preferably on the Debian/Ubuntu repos)?