【发布时间】:2012-07-12 06:18:05
【问题描述】:
我有一个如下所示的 XML,其中项目的数量可以从 0 到 n 不等。有没有办法编写 XSD 来验证架构。
<?xml version="1.0" encoding="utf-8" ?>
<ShoppingItems>
<CustomerName>John</CustomerName>
<Address>Walstreet,Newyork</Address>
<Item1>Milk</Item1>
<Price1>1$</Price1>
<Item2>IceCream</Item2>
<Price2>1$</Price2>
<Item3>Bread</Item3>
<Price3>1$</Price3>
<Item4>Egg</Item4>
<Price4>1$</Price4>
<Item..n>Egg</Item..n>
<Price..n>1$</Price..n>
</ShoppingItems>
【问题讨论】:
标签: xsd xsd-validation