首先,我是XML的新手。我已经编写了一个VB.Net应用程序,以从数据库中提取数据并将其输出到XML文件。当我使用Notepad ++验证XML输出时,出现以下错误:
错误:元素'{http://www.w3.org/2003/05/soap-envelope}信封':没有匹配的全局声明可用于验证根。
XML文件的初始部分如下:
<?xml version="1.0" encoding="utf-8" standalone="yes"?>
<soap:Envelope xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
xmlns:soap="http://www.w3.org/2003/05/soap-envelope"
xmlns:lod="http://bdm.vic.gov.au/Schemas/LodgeDRS_v1.2"
xmlns:com="http://bdm.vic.gov.au/Schemas/CommonTypes_v1.0"
xmlns:xm="http://www.w3.org/2005/05/xmlmime"
xmlns:lod1="http://bdm.vic.gov.au/Schemas/LodgeApplication_v1.2">
<soap:Header/>
<soap:Body>
<lod:drsRequest>
<lod:DeceasedDetails>
XSD架构中的相关部分是
<?xml version="1.0" encoding="UTF-8" standalone="yes"?>
<xs:schema xmlns:xs="http://www.w3.org/2001/XMLSchema"
xmlns:tns="http://bdm.vic.gov.au/Schemas/LodgeDRS_v1.3"
xmlns:types="http://bdm.vic.gov.au/Schemas/CommonTypes_v1.0"
xmlns:app="http://bdm.vic.gov.au/Schemas/LodgeApplication_v1.2"
targetNamespace="http://bdm.vic.gov.au/Schemas/LodgeDRS_v1.3" elementFormDefault="qualified"
attributeFormDefault="unqualified">
<xs:import namespace="http://bdm.vic.gov.au/Schemas/CommonTypes_v1.0" schemaLocation="CommonTypes.xsd"/>
<xs:import namespace="http://bdm.vic.gov.au/Schemas/LodgeApplication_v1.2"
schemaLocation="LodgeApplication.xsd"/>
<xs:element name="drsRequest" type="tns:drsRequest"/>
<xs:complexType name="drsRequest">
任何帮助将不胜感激
谢谢