Warning: file_get_contents(/data/phpspider/zhask/data//catemap/6/eclipse/8.json): failed to open stream: No such file or directory in /data/phpspider/zhask/libs/function.php on line 167

Warning: Invalid argument supplied for foreach() in /data/phpspider/zhask/libs/tag.function.php on line 1116

Notice: Undefined index: in /data/phpspider/zhask/libs/function.php on line 180

Warning: array_chunk() expects parameter 1 to be array, null given in /data/phpspider/zhask/libs/function.php on line 181
Xml 如何根据引用的模式使Eclipse使用自动完成_Xml_Eclipse_Xsd - Fatal编程技术网

Xml 如何根据引用的模式使Eclipse使用自动完成

Xml 如何根据引用的模式使Eclipse使用自动完成,xml,eclipse,xsd,Xml,Eclipse,Xsd,我正在尝试为一个xml文档创建一个模式,以便在Eclipse中自动完成,但是我找不到任何关于如何实现这一点的教程。我已经创建了一个xsd文件 <?xml version="1.0"?> <xs:schema xmlns:xs="http://www.w3.org/2001/XMLSchema"> <xs:element name="note"> <xs:complexType> <xs:sequence> &l

我正在尝试为一个xml文档创建一个模式,以便在Eclipse中自动完成,但是我找不到任何关于如何实现这一点的教程。我已经创建了一个xsd文件

<?xml version="1.0"?>
<xs:schema xmlns:xs="http://www.w3.org/2001/XMLSchema">

<xs:element name="note">
  <xs:complexType>
    <xs:sequence>
      <xs:element name="to" type="xs:string"/>
      <xs:element name="from" type="xs:string"/>
      <xs:element name="heading" type="xs:string"/>
      <xs:element name="body" type="xs:string"/>
    </xs:sequence>
  </xs:complexType>
</xs:element>

</xs:schema>

但是当尝试创建xml文档时,没有自动完成功能。我的xml文档以

<root xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" 
      xsi:schemaLocation="C:/root/to/namespace/dir
         C:/root/to/namespace/dir/namespace.xsd">


Autocomplete是您使用的工具的一个功能,而不是XML或XSD的本质部分。请指定要使用的工具以使自动完成工作。另外,请阅读如何使用xsi:schemaLocation: