Refactored opensearch xml support.