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

时间:2014-03-21 14:59:09

标签: xml eclipse xsd

我正在尝试为Eclipse中的自动完成创建一个xml文档的模式,但我找不到任何有关如何执行此操作的教程。我创建了一个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 doc以

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

0 个答案:

没有答案
相关问题