Get Full tag
Having trouble installing Oxygen? Got a bug to report? Post it all here.
-
- Posts: 68
- Joined: Mon Jul 04, 2022 8:42 am
Get Full tag
Hi Team,
In my code i am getting nodes by FindNodesByXpath("/headtext");
Here i am not getting full tag attributes instead i am getting <headtext align="center" ,> (337, 349).
I need entire tags and attributes with values. Example is given below.
Please do the needful.
Example :
<headtext align="centre">Syllabus<headtext>
In my code i am getting nodes by FindNodesByXpath("/headtext");
Here i am not getting full tag attributes instead i am getting <headtext align="center" ,> (337, 349).
I need entire tags and attributes with values. Example is given below.
Please do the needful.
Example :
<headtext align="centre">Syllabus<headtext>
-
- Posts: 515
- Joined: Wed May 20, 2009 2:40 pm
Re: Get Full tag
Hello,
Can you please give us more details about the code you are referring to and what you are trying to obtain?
Do you use the AuthorDocumentController.findNodesByXPath(String, boolean, boolean, boolean) API?
If this is the case, the result is a list of AuthorNodes that contain information about the start and end offsets of the node (see AuthorNode.getStartOffset() and AuthorNode.getEndOffset() methods).
Best Regards,
Mihaela
Can you please give us more details about the code you are referring to and what you are trying to obtain?
Do you use the AuthorDocumentController.findNodesByXPath(String, boolean, boolean, boolean) API?
If this is the case, the result is a list of AuthorNodes that contain information about the start and end offsets of the node (see AuthorNode.getStartOffset() and AuthorNode.getEndOffset() methods).
Best Regards,
Mihaela
Mihaela Calotescu
http://www.oxygenxml.com
http://www.oxygenxml.com
-
- Posts: 68
- Joined: Mon Jul 04, 2022 8:42 am
Re: Get Full tag
Hi Mihaela,
Thank you for the response. Yes i use AuthorDocumentController.findNodesByXPath(String, boolean, boolean, boolean) and the result is a list of AuthorNodes.
My requirement is to display the node. So when i iterate the list and display the data i am getting node as <headtext align="center" ,> (337, 349).
But i need node as <headtext align="centre">xyz<headtext>.
My question is how to get full node like <headtext align="centre">xyz<headtext>.
Thank you for the response. Yes i use AuthorDocumentController.findNodesByXPath(String, boolean, boolean, boolean) and the result is a list of AuthorNodes.
My requirement is to display the node. So when i iterate the list and display the data i am getting node as <headtext align="center" ,> (337, 349).
But i need node as <headtext align="centre">xyz<headtext>.
My question is how to get full node like <headtext align="centre">xyz<headtext>.
-
- Posts: 515
- Joined: Wed May 20, 2009 2:40 pm
Re: Get Full tag
Hello,
The API that you need to obtain the XML representation of an AuthorNode is:
Please let us know if you need more information.
Best Regards,
Mihaela
The API that you need to obtain the XML representation of an AuthorNode is:
- AuthorDocumentController.createDocumentFragment(AuthorNode, boolean) to obtain the AuthorDocumentFragment corresponding to the node
- AuthorDocumentController.serializeFragmentToXML(AuthorDocumentFragment) to obtain the XML text corresponding to a given AuthorDocumentFragment.
Please let us know if you need more information.
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