元素中添加以下 <xs:simpleType> <xs:restriction base="xs:string"> <xs:pattern value="\S+"></xs:pattern> </xs:restriction> </xs:simpleType> 转载于:https://blog.51cto.com/yujie020/555662