【问题标题】:xsd validating url with parameters [duplicate]xsd 使用参数验证 url [重复]
【发布时间】:2016-09-08 01:06:25
【问题描述】:

我在尝试验证字符串时遇到问题。这个字符串应该是一个 URL,所以它可以有参数。当我添加“&”以添加超过 1 个参数时,我收到此错误:

格式不正确:对实体“mysecondip”的引用必须以 这 ';'分隔符。

这是xml:

<url>http://www.google.com?myip=192.168.0.1&mysecondip=192.168.0.2</url>

还有xsd

<xs:schema xmlns:xs="http://www.w3.org/2001/XMLSchema">
  <xs:element name="url" type="xs:string"/>
</xs:schema>

Sample

【问题讨论】:

    标签: xml xsd


    【解决方案1】:

    没关系,我发现另一个问题相同的问题:

    The reference to entity "foo" must end with the ';' delimiter

    无论如何,谢谢,您可以关闭此问题或将其标记为重复。

    【讨论】:

      猜你喜欢
      • 1970-01-01
      • 2011-10-12
      • 2013-09-01
      • 2018-11-29
      • 1970-01-01
      • 2011-06-18
      • 1970-01-01
      • 1970-01-01
      • 1970-01-01
      相关资源
      最近更新 更多