Join the splitted element

Having trouble deploying Oxygen XML Web Author? Got a bug to report? Post it all here.
shilpa
Posts: 66
Joined: Mon Jul 04, 2022 8:42 am

Join the splitted element

Post by shilpa »

Hi Team,

I have splitted the element using documentcCntroller.split(). Now i want to join back the elements to its initial position how to achieve it?

Example :
1. <label.designator>FN</label.designator>

after split it becomes
<label.designator>F</label.designator><label.designator>N</label.designator>

now i want to join it back as
<label.designator>FN</label.designator>

Please let us know is there any existing method for the same?


Regards
Shilpa.P
mihaela
Posts: 489
Joined: Wed May 20, 2009 2:40 pm

Re: Join the splitted element

Post by mihaela »

Hello,

There is no direct method to join the elements but you can use other methods from AuthorDocumentController to obtain this. For example:
- ro.sync.ecss.extensions.api.AuthorDocumentController.createDocumentFragment(int, int) to get the content from the second node as AuthorDocumentFragment
- ro.sync.ecss.extensions.api.AuthorDocumentController.serializeFragmentToXML(AuthorDocumentFragment) to get the content from the first step as String
- ro.sync.ecss.extensions.api.AuthorDocumentController.deleteNode(AuthorNode) to delete the second node
- ro.sync.ecss.extensions.api.AuthorDocumentController.insertXMLFragment(String, int) to insert the content fragment obtained at step two inside the first node.

Best Regards,
Mihaela
Mihaela Calotescu
http://www.oxygenxml.com
Post Reply