Skip to main content


Eclipse Community Forums
Forum Search:

Search      Help    Register    Login    Home
Home » Language IDEs » ServerTools (WTP) » Reading an XML's schema via the Web Tools editor
Reading an XML's schema via the Web Tools editor [message #754790] Fri, 04 November 2011 11:19 Go to next message
Roded Bahat is currently offline Roded BahatFriend
Messages: 152
Registered: August 2011
Senior Member
Hello,
I'm working on a Eclipse plugin which adds content assist proposals to proprietary XML files.
I would like to inspect the XML's (that is, the XML file currently open in the editor) schema from within the plugin and to provide proposals based on it.
Is this possible to do via some Web Tools editor API?
This seems to me to be a better solution than reading and parsing the XSD in my plugin myself.
Thanks a lot.
Roded
Re: Reading an XML's schema via the Web Tools editor [message #756998 is a reply to message #754790] Tue, 15 November 2011 21:49 Go to previous messageGo to next message
David Carver is currently offline David CarverFriend
Messages: 174
Registered: July 2009
Senior Member
With the latest release of Eclipse, there is an XML Content Model view, which allows you to explore the content model/schema that the WTP editor is currently using. You can start exploring at any element or attribute.

Hope this is what you are looking for.
Re: Reading an XML's schema via the Web Tools editor [message #757151 is a reply to message #756998] Wed, 16 November 2011 19:20 Go to previous messageGo to next message
Paul Fullbright is currently offline Paul FullbrightFriend
Messages: 201
Registered: July 2009
Senior Member
That's a pretty cool feature!

Can I suggest adding a pop-up option to open the view?
Re: Reading an XML's schema via the Web Tools editor [message #757544 is a reply to message #757151] Fri, 18 November 2011 20:31 Go to previous messageGo to next message
David Carver is currently offline David CarverFriend
Messages: 174
Registered: July 2009
Senior Member
Type CTRL+3 and type Content Model.

BTW, there is also an XML Doc View as well, which is similar to the Java Doc view. If an element or attribute has a schema and documentation annotations, they will show up in that view.

[Updated on: Fri, 18 November 2011 20:33]

Report message to a moderator

Re: Reading an XML's schema via the Web Tools editor [message #757545 is a reply to message #757544] Fri, 18 November 2011 20:34 Go to previous messageGo to next message
Paul Fullbright is currently offline Paul FullbrightFriend
Messages: 201
Registered: July 2009
Senior Member
Yes, you can do that for any view.

What I mean is adding it to the "Show in" popup menu option *specifically* for while inside XML source. Definitely adds to the visibility for the feature.
Re: Reading an XML's schema via the Web Tools editor [message #757548 is a reply to message #757544] Fri, 18 November 2011 20:52 Go to previous messageGo to next message
Paul Fullbright is currently offline Paul FullbrightFriend
Messages: 201
Registered: July 2009
Senior Member
Yes, you can do that for any view.

What I mean is adding it to the "Show in" popup menu option *specifically* for while inside XML source. Definitely adds to the visibility for the feature.
Re: Reading an XML's schema via the Web Tools editor [message #757549 is a reply to message #757548] Fri, 18 November 2011 21:03 Go to previous message
Roded Bahat is currently offline Roded BahatFriend
Messages: 152
Registered: August 2011
Senior Member
Actually, I meant inspecting the content model from plugin code via a Web Tools API.
Thanks anyway though.
Previous Topic:"Hot overlay" in m2e
Next Topic:URL exception
Goto Forum:
  


Current Time: Fri Apr 19 08:04:38 GMT 2024

Powered by FUDForum. Page generated in 0.02773 seconds
.:: Contact :: Home ::.

Powered by: FUDforum 3.0.2.
Copyright ©2001-2010 FUDforum Bulletin Board Software

Back to the top