#622 improved get_component to use xpath and eval only if function exists