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
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();
Instead of goto_oid() and dt, try using this instead:
oid_delete($arr[$i]);