How to create xsd which can preserve space in xml?

喜夏-厌秋 提交于 2019-12-25 11:45:44

问题


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

标签
易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!