您可以使用在 IDE 中注册的 XML 目录来约束 XML 实例文档。
使用 XML 目录来约束新的 XML 文档:
<root xmlns:xsi='http://www.w3.org/2001/XMLSchema-instance' xsi:noNamespaceSchemaLocation='null'> </root>使用以下标记替换该标记:
<schema-root-element xmlns:prefix='schema-targetNamespace' xmlns:xsi='http://www.w3.org/2001/XMLSchema-instance' xsi:schemaLocation='schema-targetNamespace schema-targetNamespace'> </schema-root-element>