This reverts commit 7bce8c2e491562873705e3e451ba66d005b22646.
Contains common xml import and export filter logic.