Home > Eclipse > Working with DTD in Eclipse

Working with DTD in Eclipse

DTD, Document Type Definition, can help you when you are writing XML file. DTD can force XML rule integrity, so you won’t write wrong XML Scheme.

In eclipse, DTD can help you in writing XML with its intellisense feature, just like you do the Java. Just type any word and help will came after you.

To insert DTD file in eclipse is such an easy problem, just run your eclipse and point your mouse at Window -> Preferences -> Web and XML -> XML Catalog, if you point it correctly you will see this screen.

Click Add… Button and fill Information about your DTD,  i will explain how to determine Key and Web Address informations from the XML file, later.

Now OK, and create your XML file, just like below and press CTRL+SPACE to ensure you have inserted the DTD correctly. If the intellisense came out perfectly, we can assume that Eclipse can handle your DTD perfectly now.

As i promised, now i will explain about relating XML to its DTD. See the picture below and i thought now you can determine it by yourself.

Pretty simple huh. Well, hope this short tutorial would be useful for you.

Categories: Eclipse Tags: ,
  1. No comments yet.
  1. 15 December 2010 at 10:50

Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out /  Change )

Google+ photo

You are commenting using your Google+ account. Log Out /  Change )

Twitter picture

You are commenting using your Twitter account. Log Out /  Change )

Facebook photo

You are commenting using your Facebook account. Log Out /  Change )


Connecting to %s

%d bloggers like this: