理解XML标签时出现问题 [英] Problem in understanding the XML tag
本文介绍了理解XML标签时出现问题的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!
问题描述
以下标记的含义是什么,该标记是对XSD文件中字符串的验证.
What is the meaning of following tag, This tag is the validation for a string in XSD file
<xs:pattern value="([ -~])*"/>
完整的标签是
the complete tags are
<xs:element name="DESCRIPTION-OF-GOODS">
<xs:simpleType>
<xs:restriction base="xs:string">
<xs:maxLength value="255"/>
<xs:minLength value="1"/>
<xs:pattern value="([ -~])*"/>
</xs:restriction>
</xs:simpleType>
</xs:element>
推荐答案
您好,
这是一个正则表达式模式(RegEx).
xs:pattern value =([-〜])*"
[] 是一个字符类,这意味着它将与所有类中的一个字符匹配.
-表示一个字符范围,此处所有字符从"到〜"
()是一个组
* 表示您希望的时间.
因此,从根本上讲,这意味着您可以根据需要多次重复"和〜"之间的任何字符.其他任何字符都将使节点无效.
在此处查看详细信息:
http://www.regular-expressions.info/reference.html [
Hello,
This is a Regular expression pattern(RegEx).
xs:pattern value="([ -~])*"
[ ] is a character class, that means it will match one character out of all the class possibilities.
- means a range of characters, here all characters from " " to "~"
( )is a group
* means as many time as you wish.
So basically it means that you can have any characters between " " and "~" repeated as often as you want. Any other character will make the node invalid.
See details here:
http://www.regular-expressions.info/reference.html[^]
Valery.
这篇关于理解XML标签时出现问题的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!
查看全文