Eclipse Community Forums
Forum Search:

Search      Help    Register    Login    Home
Home » Eclipse Projects » Web Tools Project (WTP) » Get xml node from XML Editor
Get xml node from XML Editor [message #202697] Fri, 19 October 2007 14:50 Go to next message
Eclipse UserFriend
Originally posted by: roman.reimer.xi-works.de

This is a multi-part message in MIME format.

------=_NextPart_000_000A_01C81270.33AF4220
Content-Type: text/plain;
charset="iso-8859-1"
Content-Transfer-Encoding: quoted-printable

Hallo,

How to get xml node from XML Editor by cursor position?
------=_NextPart_000_000A_01C81270.33AF4220
Content-Type: text/html;
charset="iso-8859-1"
Content-Transfer-Encoding: quoted-printable

<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0 Transitional//EN">
<HTML><HEAD>
<META http-equiv=3DContent-Type content=3D"text/html; =
charset=3Diso-8859-1">
<META content=3D"MSHTML 6.00.6000.16544" name=3DGENERATOR>
<STYLE></STYLE>
</HEAD>
<BODY>
<DIV><FONT face=3DArial size=3D2>Hallo,</FONT></DIV>
<DIV><FONT face=3DArial size=3D2></FONT>&nbsp;</DIV>
<DIV><FONT face=3DArial size=3D2>How to get xml node from XML Editor by =
cursor=20
position?</FONT></DIV></BODY></HTML>

------=_NextPart_000_000A_01C81270.33AF4220--
Re: Get xml node from XML Editor [message #202842 is a reply to message #202697] Mon, 22 October 2007 21:42 Go to previous message
Nitin Dahyabhai is currently offline Nitin DahyabhaiFriend
Messages: 2335
Registered: July 2009
Senior Member
Roman Reimer wrote:
> How to get xml node from XML Editor by cursor position?

The selection from the editor should already contain the Node at the
current cursor offset, otherwise you can request the
org.eclipse.wst.sse.ui.internal.provisional.extensions.ISour ceEditingTextTools
adapter from the editor. You'll want to cast the result to
org.eclipse.wst.xml.ui.internal.provisional.IDOMSourceEditin gTextTools
as that's the interface for XML.

--
Nitin Dahyabhai
Structured Source Editing


---
Nitin Dahyabhai
Eclipse WTP, IBM
Previous Topic:Displaying Attribute Node
Next Topic:Does WTP 2.0.2 need ORBIT ?
Goto Forum:
  


Current Time: Wed Nov 26 14:17:59 GMT 2014

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

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