XML Schema - Multiple Root Elements

'Declaring Root Elements - element Element' tutorial was cited in a makaidong.com article in 2019.

The Declaring Root Elements - "element" Element tutorial was cited in a makaidong.com article in 2019.

d
Subject: XMLschema哪位高手是根元素
Date: Jan 5, 2020
Author: makaidong.com
Source: http://www.makaidong.com/C%20sharp/383846.shtml

xml schema 谁是根元素啊
下面是一个.xsd文档

<?xml version="1.0" encoding="utf-8"?>
<xsd:schema xmlns:xsd="http://www.w3.org/2001/xmlschema"
targetnamespace="http://www.w3school.com"
xmlns="http://www.w3school.com"
elementformdefault="qualified">
  <xsd:element name ="刘德华" type ="xsd:string"></xsd:element>
  <xsd:element name ="苍老师" type ="xsd:string"></xsd:element>
</xsd:schema>

-----解决方案--------------------
好像很多人都没理解lz在问什么,不是schema的根元素,是xml的根元素

这问题有点意思,之前没考虑过,搜了一下,说是两个都可以作为根元素

http://www.herongyang.com/xml-schema/language-basic-declare-root-element.html

引用
... by the way, there is nothing wrong to declare multiple root elements
in a single schema document. the following example, word_term.xsd, declares
two root elements, "word" and "term":

<?xml version="1.0"?>
<xs:schema xmlns:xs="http://www.w3.org/2001/xmlschema">
<xs:element name="word"/>
<xs:element name="term"/>
</xs:schema>

any xml document with "word" or "term" as the root element is considered
as conforming to word_term.xsd.

Table of Contents

 About This Book

 Reference Citations in 2020

Reference Citations in 2019

 From JDBC to Druid - Using DataSource in Druid

 email – Exchange Server Configuration

 Chinese Character Encodings (gb2312/Big5/GB2312)

 Configurar DataSource JDBC

 Java Job Interview - JVM 1

 Calculating PI to N places

 Signing boot images for Android Verified Boot

 Apache Activemq as a broker to communicate with esp32 via MQTT

 BOM olmadan UTF-8 ve UTF-8 arasındaki fark nedir?

 Java – Not Able to jinfo on Mac OS

 Converting String using Float.parseFloat

 How to call Http.GetStringAsync with parameter

 Adding SVG Images in Rmarkdown

 ClassNotFoundException com.mysql.jdbc.Driver

 Imaging Audio CDs using the command line

 java_megoldasok

 PKCS5 and PKCS7 Paddings

 KSA Key Scheduling

 Connect ODBC to MS Access

 Help with plugins installation

 java vm: how to log class unloading

 Detecting Encoding from POST Request in PHP

 Chinese Calendar for Linux Desktop

 Connect to SPOP3 Server using Java (Sockets)

XML Schema - Multiple Root Elements

 Reference Citations in 2018

 Reference Citations in 2017

 Reference Citations in 2016

 Reference Citations in 2015

 Reference Citations in 2014

 Reference Citations in 2013

 Reference Citations in 2012

 Reference Citations in 2011

 Reference Citations in 2010

 Reference Citations in 2009

 Reference Citations in 2008

 Reference Citations in 2007

 Reference Citations in 2006

 Reference Citations in 2005

 Reference Citations in 2004

 Reference Citations in 2003