normalize-space(Datas/Data[@key='Name']/string)
might suffice, it will trim white space and the start and end. It does however also collapse any white space in between to a single space, I don't know whether you want that.
与恶龙缠斗过久,自身亦成为恶龙;凝视深渊过久,深渊将回以凝视…