开发者

how to import a schema to a XML file

开发者 https://www.devze.com 2023-02-19 06:12 出处:网络
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:

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

精彩评论

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