cancel
Showing results for 
Search instead for 
Did you mean: 

i m not able to create xml file in Java Project

Former Member
0 Kudos

hi all,

I have created one java project just to try with Ant Builder. I have created one class inside it. and now i m creating an XML file inside that project.

But as soon as i try to create the File -> New -> File and give the .xml extention of the file this gives error into the project.

Will you suggest me the solution for that?

Thanks in advance.

Accepted Solutions (0)

Answers (1)

Answers (1)

Former Member
0 Kudos

Assuming that you are facing this problem in NDS, here is the solution.

Go to Windows--> Preferences --> WorkBench -->File Associations

In the File Types list select *.xml

This will display the default associated XML editor as

XML Editor(default) in the bottom list box.

Click on add button near the bottom list box and select Text Editor, click Ok.You will see one more entry in the list box as "Text Editor".

Select this entry and click on the default button.

Click Ok and close the preferences dialogue.

Now create a new xml file.You wont see the error this time.

Please note that this will treat all simple xml files you will create as TEXT Files and always open with Text Editor.You can override this behaviour with right click on the file and select appropriate editor from the "Open With" context menu.

The error you are talking about is because the XML editor tries to check well-formedness and basic syntax rules for the file that you newly created, actually is a noce feature of the IDE.

Rgds,

Amol