xsd 使用参数验证 url

xsd validating url with parameters

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

Not well formed: The reference to entity "mysecondip" must end with the ';' delimiter.

这是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

没关系,我发现了另一个有同样问题的问题:

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

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