How to replace the text content of an element
Oxygen general issues.
-
- Posts: 23
- Joined: Mon Feb 20, 2017 8:03 pm
How to replace the text content of an element
I want to replace the text content of an XML element (location defined via XPath) with an oXygen author mode action, but I do not know which operation to choose for this.
The operation InsertOrReplaceText only allows for inserting or replacing text at the caret position.
The operation InsertOrReplaceFragmentOperation with the Xpath element/*[1] and the insertPosition replace does not replace the content either, but does add the text instead.
The operation InsertOrReplaceText only allows for inserting or replacing text at the caret position.
The operation InsertOrReplaceFragmentOperation with the Xpath element/*[1] and the insertPosition replace does not replace the content either, but does add the text instead.
-
- Posts: 515
- Joined: Wed May 20, 2009 2:40 pm
Re: How to replace the text content of an element
Hi,
The commons operations that are available now in the API do not cover your use-case. You can create a custom operation [1] that implements AuthorOperation [2] and replaces the element content.
The good news is that we just implemented an operation that does exactly what you need (called ReplaceElementContentOperation). This will be included in the next release of Oxygen XML Editor (version 22). We can send you a jar containing this operation. For this, please write us an email on our support address: support@oxygenxml.com.
[1] https://www.oxygenxml.com/doc/versions/ ... HowTo.html
[2]https://www.oxygenxml.com/InstData/Edit ... ation.html
The commons operations that are available now in the API do not cover your use-case. You can create a custom operation [1] that implements AuthorOperation [2] and replaces the element content.
The good news is that we just implemented an operation that does exactly what you need (called ReplaceElementContentOperation). This will be included in the next release of Oxygen XML Editor (version 22). We can send you a jar containing this operation. For this, please write us an email on our support address: support@oxygenxml.com.
[1] https://www.oxygenxml.com/doc/versions/ ... HowTo.html
[2]https://www.oxygenxml.com/InstData/Edit ... ation.html
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