cancel
Showing results for 
Search instead for 
Did you mean: 
cancel
Showing results for 
Search instead for 
Did you mean: 

Select multiple elements to delete

Highlighted
Aquamarine

Select multiple elements to delete

Hello, I have a table that that has a column of indexterm elements that I would like to delete. How can I select all of the indexterm elements and delete them?

 

Bryon 

2 REPLIES 2
Highlighted

Re: Select multiple elements to delete

Tried this and it seems to work, only it does not delete anything within the tags.

 

Bryon

 

function remove_indexterm_tags()
{
local oid = oid_first_tag()
local cnt
local i = 1

cnt = oid_find_children(oid, $arr, "indexterm")
for ($i=1; $i<=$cnt; $i+=1)
{
if (oid_name(oid_parent($arr[$i])) == "entry")
{
goto_oid($arr[$i],-1)
dt
}
}
}
map F1 remove_indexterm_tags();

Re: Select multiple elements to delete

Instead of goto_oid() and dt, try using this instead:

oid_delete($arr[$i]);
Announcements