Skip to main content



      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 07:19 Go to next message
Eclipse UserFriend
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 16:49 Go to previous messageGo to next message
Eclipse UserFriend
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 14:20 Go to previous messageGo to next message
Eclipse UserFriend
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 15:31 Go to previous messageGo to next message
Eclipse UserFriend
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 15:33] by Moderator

Re: Reading an XML's schema via the Web Tools editor [message #757545 is a reply to message #757544] Fri, 18 November 2011 15:34 Go to previous messageGo to next message
Eclipse UserFriend
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 15:52 Go to previous messageGo to next message
Eclipse UserFriend
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 16:03 Go to previous message
Eclipse UserFriend
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: Wed Jul 23 10:55:41 EDT 2025

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

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

Back to the top