deleting alll elements (and contents) of a certain type
Oxygen general issues.
-
- Posts: 8
- Joined: Fri Mar 04, 2011 3:28 pm
deleting alll elements (and contents) of a certain type
I feel like there is an easy a solution to this question, but after lots of frustration I thought I should just ask.
Basically, I want to select all "index" elements and then delete them.
I am able to "find" all elements of certain types and their contents using the Find->find elements/attributes. However, I want to delete all of these at once. But I can't. Am I missing something?
Then I tried to do this with a regular find and replace. But I don't seem to able able "find" the entirely of the element i.e. <index>.. content. </index>
I'm grateful for any help you can give me.
Basically, I want to select all "index" elements and then delete them.
I am able to "find" all elements of certain types and their contents using the Find->find elements/attributes. However, I want to delete all of these at once. But I can't. Am I missing something?
Then I tried to do this with a regular find and replace. But I don't seem to able able "find" the entirely of the element i.e. <index>.. content. </index>
I'm grateful for any help you can give me.
-
- Posts: 2879
- Joined: Tue May 17, 2005 4:01 pm
Re: deleting alll elements (and contents) of a certain type
Hello,
To delete all the elements of a certain name and their content you can use the Find/Replace dialog with XPath:
1. Find -> Find/Replace
2. Text to find: .*
3. Replace with: <leave empty>
4. XPath: //index
5. Enable Regular expression and Dot matches all
6. Press Find all to check that it finds what you want to remove.
7. Press "Replace all" to remove the content.
Regards,
Adrian
To delete all the elements of a certain name and their content you can use the Find/Replace dialog with XPath:
1. Find -> Find/Replace
2. Text to find: .*
3. Replace with: <leave empty>
4. XPath: //index
5. Enable Regular expression and Dot matches all
6. Press Find all to check that it finds what you want to remove.
7. Press "Replace all" to remove the content.
Regards,
Adrian
Adrian Buza
<oXygen/> XML Editor, Schema Editor and XSLT Editor/Debugger
http://www.oxygenxml.com
<oXygen/> XML Editor, Schema Editor and XSLT Editor/Debugger
http://www.oxygenxml.com
Jump to
- Oxygen XML Editor/Author/Developer
- ↳ Feature Request
- ↳ Common Problems
- ↳ DITA (Editing and Publishing DITA Content)
- ↳ Artificial Intelligence (AI Positron Assistant add-on)
- ↳ 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