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"/>
精彩评论