getParent() result on root node
Post here questions and problems related to oXygen frameworks/document types.
-
- Posts: 168
- Joined: Fri Jan 20, 2017 1:11 pm
getParent() result on root node
Hello,
I work with the version 22 of Oxygen SDK.
We have noticed this in the javadoc :
And then use the method getParent() on the rootNode; It provides an AuthorDocument and not null has expected.
Is it normal ?
Did we miss an information or the javadoc is not up to date ?
I have checked the release notes on your website (https://www.oxygenxml.com/xml_editor/whatisnew22.1.html) and i did not find any changes on that part.
Regards,
Isabelle
I work with the version 22 of Oxygen SDK.
We have noticed this in the javadoc :
But we get the root element like this :getParent
AuthorNode getParent()
Returns:
The AuthorNode representing the parent of this element, or null if this is the root element.
Code: Select all
AuthorNode rootNode = authorAccess.getDocumentController().getNodeAtOffset(authorAccess.getEditorAccess().getCaretOffset());
Is it normal ?
Did we miss an information or the javadoc is not up to date ?
I have checked the release notes on your website (https://www.oxygenxml.com/xml_editor/whatisnew22.1.html) and i did not find any changes on that part.
Regards,
Isabelle
-
- Posts: 9433
- Joined: Fri Jul 09, 2004 5:18 pm
Re: getParent() result on root node
Hi Isabelle,
The Javadoc is incorrect, I will rectify it like this:
The code has always worked this way, the root AuthorElement has a parent node which is an AuthorDocument node. The AuthorDocument node may also contain comments or processing instructions which are present before or after the root element.
Regards,
Radu
The Javadoc is incorrect, I will rectify it like this:
Code: Select all
/**
* @return The {@link AuthorNode} representing the parent of this element,
* or <code>null</code> if this is the document node.
*/
AuthorNode getParent();
Regards,
Radu
Radu Coravu
<oXygen/> XML Editor
http://www.oxygenxml.com
<oXygen/> XML Editor
http://www.oxygenxml.com
Return to “SDK-API, Frameworks - Document Types”
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