get Current node (name) in AuthorOperation
Are you missing a feature? Request its implementation here.
-
- Posts: 53
- Joined: Tue Aug 23, 2005 12:00 pm
get Current node (name) in AuthorOperation
Hi,
Is it possible to find out where your are inside the document in terms of XML. I need to find out if an node a or node b. Depending on this location i either need to add a fragment at the caret position or as a sibling under the current node.
tx.,
Is it possible to find out where your are inside the document in terms of XML. I need to find out if an node a or node b. Depending on this location i either need to add a fragment at the caret position or as a sibling under the current node.
tx.,
-
- Posts: 4141
- Joined: Fri Mar 28, 2003 2:12 pm
Re: get Current node (name) in AuthorOperation
Post by sorin_ristache »
Hello,
You can find the current XML node based on the current position of the cursor in the Author editor and once you find the current XML node you request the name of the node:
Regards,
Sorin
You can find the current XML node based on the current position of the cursor in the Author editor and once you find the current XML node you request the name of the node:
Code: Select all
int offset = authorAccess.getCaretOffset();
AuthorNode node = authorAccess.getDocumentController().getNodeAtOffset(offset);
String name = node.getName();
Sorin
-
- Posts: 53
- Joined: Tue Aug 23, 2005 12:00 pm
Re: get Current node (name) in AuthorOperation
Sorin,
Thanks for the prompt reply (again!)
The JavaDoc writes that this returns the qualified name, is there a way of obtaining the local-name or the qualified name as a QName?
tx.,
Thanks for the prompt reply (again!)
The JavaDoc writes that this returns the qualified name, is there a way of obtaining the local-name or the qualified name as a QName?
tx.,
Jump to
- Oxygen XML Editor/Author/Developer
- ↳ Feature Request
- ↳ Common Problems
- ↳ DITA (Editing and Publishing DITA Content)
- ↳ Artificial Intelligence (AI Positron Assistant add-on)
- ↳ SDK-API, Frameworks - Document Types
- ↳ DocBook
- ↳ TEI
- ↳ XHTML
- ↳ Other Issues
- Oxygen XML Web Author
- ↳ Feature Request
- ↳ Common Problems
- Oxygen Content Fusion
- ↳ Feature Request
- ↳ Common Problems
- Oxygen JSON Editor
- ↳ Feature Request
- ↳ Common Problems
- Oxygen PDF Chemistry
- ↳ Feature Request
- ↳ Common Problems
- Oxygen Feedback
- ↳ Feature Request
- ↳ Common Problems
- Oxygen XML WebHelp
- ↳ Feature Request
- ↳ Common Problems
- XML
- ↳ General XML Questions
- ↳ XSLT and FOP
- ↳ XML Schemas
- ↳ XQuery
- NVDL
- ↳ General NVDL Issues
- ↳ oNVDL Related Issues
- XML Services Market
- ↳ Offer a Service