2014-04-23 2 views

답변

1

이 XSD :

<?xml version='1.0' encoding='UTF-8'?> 
<xsd:schema xmlns:xsd="http://www.w3.org/2001/XMLSchema"> 
    <xsd:element name="prices"> 
    <xsd:complexType> 
     <xsd:sequence> 
     <xsd:element name="price" maxOccurs="unbounded"> 
      <xsd:simpleType> 
      <xsd:restriction base="xsd:string"> 
       <xsd:pattern value="\$[1-3]?[0-9]?[0-9]?(\.[0-9][0-9])?|(\$400(\.00)?)"/> 
      </xsd:restriction> 
      </xsd:simpleType> 
     </xsd:element> 
     </xsd:sequence> 
    </xsd:complexType> 
    </xsd:element> 
</xsd:schema> 

는이 가격을 수 있습니다 :

<?xml version="1.0" encoding="utf-8" ?> 
<prices> 
    <price>$0</price> 
    <price>$1</price> 
    <price>$1.00</price> 
    <price>$1.99</price> 
    <price>$400.00</price> 
    <price>$400</price> 
    <price>$.99</price> 
</prices> 
+0

감사합니다 많이! 그게 도움이 !! – d2xmathengine

관련 문제