Find out nodes
Having trouble installing Oxygen? Got a bug to report? Post it all here.
-
- Posts: 68
- Joined: Mon Jul 04, 2022 8:42 am
Find out nodes
Hi Team,
I would like to know how to get below result
How to check the node X is child node Y ?
How to check the node X is immediate child of node Y?
How to check X is the same node of Y?
How to check ancestor node of X?
How to get node using start offset and end offset?
Thanks & Regards
Shilpa.P
I would like to know how to get below result
How to check the node X is child node Y ?
How to check the node X is immediate child of node Y?
How to check X is the same node of Y?
How to check ancestor node of X?
How to get node using start offset and end offset?
Thanks & Regards
Shilpa.P
-
- Posts: 515
- Joined: Wed May 20, 2009 2:40 pm
Re: Find out nodes
Hello,
I think you are referring to the SDK-API, even if you posted inside the "Common Problems" section. Please post further questions related to the SDK inside the SDK-API, Frameworks - Document Types category. Thank you!
By "node" I think you are referring to an ro.sync.ecss.extensions.api.node.AuthorNode so you have to know that there is a ro.sync.ecss.extensions.api.node.AuthorNode.getParent() method can be used to find its parent node.
To find the child nodes you first have to check if the AuthorNode is an ro.sync.ecss.extensions.api.node.AuthorParentNode and then use the ro.sync.ecss.extensions.api.node.AuthorParentNode.getContentNodes() method.
These two methods that I mentioned will help you check the relationship between nodes.
If you work with offsets and you want to find some nodes in the content you have to check the ro.sync.ecss.extensions.api.AuthorDocumentController and ro.sync.ecss.extensions.api.access.AuthorEditorAccess API. Methods like ro.sync.ecss.extensions.api.AuthorDocumentController.getNodeAtOffset(int) or ro.sync.exml.workspace.api.editor.page.author.WSAuthorEditorPageBase.getFullySelectedNode(int, int) can be used to obtain nodes from the document. These are just some examples, if you need API for other specific use cases and you don't find it, please let us know.
Best Regards,
Mihaela
I think you are referring to the SDK-API, even if you posted inside the "Common Problems" section. Please post further questions related to the SDK inside the SDK-API, Frameworks - Document Types category. Thank you!
By "node" I think you are referring to an ro.sync.ecss.extensions.api.node.AuthorNode so you have to know that there is a ro.sync.ecss.extensions.api.node.AuthorNode.getParent() method can be used to find its parent node.
To find the child nodes you first have to check if the AuthorNode is an ro.sync.ecss.extensions.api.node.AuthorParentNode and then use the ro.sync.ecss.extensions.api.node.AuthorParentNode.getContentNodes() method.
These two methods that I mentioned will help you check the relationship between nodes.
If you work with offsets and you want to find some nodes in the content you have to check the ro.sync.ecss.extensions.api.AuthorDocumentController and ro.sync.ecss.extensions.api.access.AuthorEditorAccess API. Methods like ro.sync.ecss.extensions.api.AuthorDocumentController.getNodeAtOffset(int) or ro.sync.exml.workspace.api.editor.page.author.WSAuthorEditorPageBase.getFullySelectedNode(int, int) can be used to obtain nodes from the document. These are just some examples, if you need API for other specific use cases and you don't find it, please let us know.
Best Regards,
Mihaela
Mihaela Calotescu
http://www.oxygenxml.com
http://www.oxygenxml.com
Jump to
- Oxygen XML Editor/Author/Developer
- ↳ Feature Request
- ↳ Common Problems
- ↳ DITA (Editing and Publishing DITA Content)
- ↳ 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