问题
how can I create XML Schema which can preserve space in the xml ...
回答1:
you mean you wannt to create xml schema that can preserve the space in xml , If that is the question then here is the ans below
The element which you want to preserve the space just create your own data type for that element. For Ex:-
<xs:simpleType name="TitleString">
<xs:restriction base="xs:string">
<xs:whiteSpace value="preserve"/>
<xs:minLength value="5"/>
<xs:maxLength value="230"/>
</xs:restriction>
</xs:simpleType>
and use this type in your element . tell me if you find any prob.
来源:https://stackoverflow.com/questions/8665542/how-to-create-xsd-which-can-preserve-space-in-xml