2011-03-24 5 views
0

* .xsd 파일에서 XML 파일로 XML 스키마를 가져 오는 방법은 무엇입니까? 어떤 지침을 사용해야합니까? 내가 좋아하는 뭔가를 쓸 때 는 : 스키마를 XML 파일로 가져 오는 방법

<xs:schema xmlns:xs="http://schemas.microsoft.com/wix/2006/wi"> 
     <xs:include schemaLocation="wix.xsd"/> 
</xs:schema> 
<Wix xmlns="http://schemas.microsoft.com/wix/2006/wi"></Wix> 

다음 내가 할을

+0

정확히 무엇을 하시겠습니까? XML 파일에서 XSD를 참조 하시겠습니까? – justkt

+0

예, XML 파일의 XSD를 참조하고자합니다. –

답변

1
<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"/> 
2

사용 import 또는 include "문서가 여러 루트 요소를 포함 할 수 없습니다."

+0

다음과 같이 작성할 때 : \t \t < xs : include schemaLocation = "wix.xsd"/> 그러면 "문서에 여러 개의 루트가 포함될 수 없습니다 요소들 –

+0

@ Bogdan0x400 - XML ​​네임 스페이스'xs'를'http : // www.w3.org/2001/XMLSchema'로 설정해야합니다.'targetNamespace'는'http://schemas.microsoft.com/ Wiki/2006/wi % 22 % 3E' (또는 targetNamespace가 아닌'wi '와 같은 네임 스페이스로 설정하고 해당 네임 스페이스의 요소에'wi'를 사용). – justkt

관련 문제