2012-04-25 3 views

답변

1

짧은 대답 : 사전 인코딩.

XML의 문자 인코딩은 "실제"길이 값에 영향을주지 않습니다.

빠른 검사 :

<?xml version="1.0" encoding="utf-8" ?> 
<xsd:schema targetNamespace="http://tempuri.org/XMLSchema.xsd" elementFormDefault="qualified" xmlns="http://tempuri.org/XMLSchema.xsd" xmlns:xsd="http://www.w3.org/2001/XMLSchema"> 
    <xsd:element name="root"> 
     <xsd:simpleType> 
      <xsd:restriction base="xsd:string"> 
       <xsd:maxLength value="2"/> 
      </xsd:restriction> 
     </xsd:simpleType> 
    </xsd:element> 
</xsd:schema> 

유효한 XML :

<?xml version="1.0" encoding="utf-8" standalone="yes"?> 
<!-- Sample XML generated by QTAssistant (http://www.paschidev.com) --> 
<root xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns="http://tempuri.org/XMLSchema.xsd">&amp;1</root>