refactored processing_xml