XML验证和自动完成在Eclipse自动完成、XML、Eclipse

由网友(温其如玉)分享简介:在Android SDK中,当我编辑的android布局的xml文件,它可以做验证和自动完成。这是如何工作的?In android SDK, when I editing an android layout xml file, it can do validation and auto-complete. How d...

在Android SDK中,当我编辑的android布局的xml文件,它可以做验证和自动完成。这是如何工作的?

In android SDK, when I editing an android layout xml file, it can do validation and auto-complete. How does this work?

我怎样才能使日食验证并自动完成与我自己定义的XML格式?

How can I make eclipse validate and auto-complete with my own defined xml format?

推荐答案

Eclipse可以用于编辑和验证XML文件。我在Eclipse中的J2EE开发人员经常使用它。

Eclipse can be used to edit and validate XML files. I use it quite often in my Eclipse for J2EE Developers.

首先,你必须创建pferably $ P $ XSD文件来定义XML结构。其次,你必须创建XML文件,并在其定义所在的验证可以找到XSD文件。

First, you have to create preferably an XSD file to define the XML structure. Second, you have to create the XML file and define in it where the validator can find the XSD file.

第二点,有更多的解决方案。要么你指定参考直接在XML文件中的XSD文件( noNamespaceSchemaLocation ),或者只指定了命名空间和系统ID INT XML文件,并您设置的实际路径在Eclipse IDE中的XSD文件(preferences-> XML-> XML目录,在这里你可以映射系统ID来XSD URL)。

The second point has more solutions. Either you specify the reference to the XSD file directly in the XML file (noNamespaceSchemaLocation) or you specify only the namespace and system-id int the XML file and you set the actual path to the XSD file in the Eclipse IDE (Preferences->XML->XML Catalog, here you can map system-id to XSD URL).

然后,只需点击用鼠标右键XML文件,并选择验证的选择。

Then just click the XML file with the right mouse button and select the Validate choice.

阅读全文

相关推荐

最新文章