Cannot open certain xml file with xml editor [message #59279] |
Thu, 30 December 2004 17:47  |
Eclipse User |
|
|
|
Originally posted by: will70.gmail.com
Hello,
I'm having this strange behaviour when I open an xml file with a certain
tag. I did some research and found some related bugs to my problem in the
eclipse bug database (Bug 78340).
I created a simple xml file that looks like the following:
<?xml version="1.0" encoding="UTF-8"?>
<project>
<parent>
<child>
<property></property>
</child>
</parent>
</project>
and I get the following error message when I reopen it in the XML Source
Page Editor:
Cannot open default editor on Sample.xml. Editor could not be initialized.
The culprit is the <project> tag and it has to be the first tag in the xml
file.
On the other hand the following xml file opens correctly in the XML Source
Page Editor:
<?xml version="1.0" encoding="UTF-8"?>
<parent>
<child>
<property>
<project></project>
</property>
</child>
</parent>
Here the <project> tag is nested.
I just want to know if this is a bug or it's just happening to me.
thxs,
Will
|
|
|
|
|
|
Re: Cannot open certain xml file with xml editor [message #59435 is a reply to message #59304] |
Fri, 31 December 2004 00:05  |
Eclipse User |
|
|
|
David Williams wrote:
> On Thu, 30 Dec 2004 22:47:58 +0000 (UTC), Will Lopez <will70@gmail.com>
> wrote:
>
>> <?xml version="1.0" encoding="UTF-8"?>
>> <project>
>> <parent>
>> <child>
>> <property></property>
>> </child>
>> </parent>
>> </project>
>
>
> An interesting test case. It is similar to the bug you reference.
> In this case, the "eclipse system" is recognizing this as an "ant build
> file"
> (due to the initial 'project' tag) so does not create the
> structuredDocument
> our editor is expecting.
>
> We (WTP editors) do have some work to do to allow/enable this kind of use,
> but I'm wondering ... is it really an ant file you are creating? If so,
> you could use
> the ant editor in the short term. (guess you'd have to "manually"
> associate your
> file to the ant editor, for now, since another bug 37688 is still not
> fixed/enhanced.
>
> I'll add these remarks to bug 78340.
What happens if you add a DOCTYPE before the <project> tag or a
namespace to it? Will the Ant editor still take preference?
Frank Sauer
|
|
|
Powered by
FUDForum. Page generated in 0.02619 seconds