开发者

how to import a schema to a XML file

How do you import an XML schema from a *.xsd file to an XML file? What instructions should you use? When I write something like:

<xs:schema xmlns:xs="http://schemas.microsoft.com/wix/2006/wi">
开发者_如何学Python        <xs:include schemaLocation="wix.xsd"/>
</xs:schema>
<Wix xmlns="http://schemas.microsoft.com/wix/2006/wi"></Wix>

then I get "the document can't contain multiple root elements"


Use an import or include.


<Wix xmlns="http://schemas.microsoft.com/wix/2006/wi"
  xsi:schemaLocation="http://schemas.microsoft.com/wix/2006/wi wix.xsd"
  xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"/>
0

上一篇:

下一篇:

精彩评论

暂无评论...
验证码 换一张
取 消

最新问答

问答排行榜