Eliminate an element used throughout document, but retain text it's wrapped in
Hi,
We're trying to eliminate an element used throughout our document in Arbortext, but retain the text it's wrapped in.
The issue is nearly resolved following the solution provided in this topic:
Solved: Re: Remove <P> element from a table - PTC Community
This solution works for our issue, but only for tags in tables. Our target tag could have any parent. I have tried modifying this line...
if (oid_name(oid_parent($arr[$i])) == "entry")
...replacing "entry", but had little luck.
Here's the script as it currently exists:
function remove_text_tags()
{
local oid = oid_first_tag()
local cnt
local i = 1
cnt = oid_find_children(oid, $arr, "text")
for ($i=1; $i<=$cnt; $i+=1)
{
if (oid_name(oid_parent($arr[$i])) == "entry")
{
goto_oid($arr[$i],-1)
dt
}
}
}
Thanks for any help!
Jeff

