Extracted the XML streaming processing code from the existing aliasing
code, but made it available as generic XML streaming functionality.