perhaps split into processXMLKey and processXMLValue?