extract code from scala xml doc