Removing whitespace HTTP:payload

Parsing a XML POST and sending to specific pool based upon the call using findstr - my issue is sometimes I am getting XML calls with whitespace/newline or not.

Does a method/function exist to remove whitespace or newline characters within a variable (containing several lines/characters of information)?

This is a duplicate post of http://devcentral.f5.com/Default.aspx?tabid=53&forumid=5&postid=86491&view=topic

CB