Fixed issues with extract from xml function - *WIP*