The static::variables are just a store for the STREAM expressions. They are maintained on each TMM core independently (for performance reasons) and adjusting the STREAM parsing over the time.
Its more or less just a gimmic to get it the expressions up an running without knowing the node names in advance. Once you figured out the names of the XML nodes you want to parse, you should change the logic to use fixed expression strings for STREAM.
To delete/change an entire [STREAM::match] your could call [STREAM::replace] with additional parameters.
iRule Command: STREAM::replace (f5.com)
You may forward results of the VS_STREAM to your VS_APM via the [sharedvar] command.
iRule Command: sharedvar (f5.com)
And unfortunately i dont have a working solution to unchunk a HTTP request before its hits your server.
Resolving the chunked encoding would need to [HTTP::collect] the entire request and parse the chunks from the first to the last chunk while stripping the length fields to restore the Content-Length mechanic.
It would be far easier to avoid the chunks to begin with and directly use [HTTP::collect] to parse your XML... 😉
Cheers, Kai