Hi everyone,

trying to wrap my head around grep to accomplish this: i have several very 
large XML docs and need to remove some tags from them (just the tags and 
attributes, not the content inside the tags). There is just too much to do 
this manually so i'm wondering if this is possible with BBedit.

Within the document i have these kind of elements:

<structured-content content-type="task" vocab="work" vocab-term="main" id=
"id-c416e7d8-cd3d-4c85-bb5a-d5496d0aa54a">Some text content here
</structured-content>



sometimes there can be one or several other elements inside these elements 
like for example:


<structured-content content-type="task" vocab="work" vocab-term="main" id=
"id-c416e7d8-cd3d-4c85-bb5a-d5496d0aa54a">Some <xref ref-type="ctrl" rid=
"id-a1847df5-8e01-21d8-f1d1-88b03728498b">text content</xref> here.
</structured-content>


So i need to remove the <structured-content> tags entirely but preserve the 
content and tags WITHIN these elements, is this at all possible with grep 
in bbedit ? 

Note that the code above is just a very simple example to illustrate, it 
gets much more complicated than that with tables, mathml, figures etc 
inside the tags to be removes ... there isn't a repetitive pattern to the 
content that can be inside the tags to be stripped, it could be anything so 
i want to be sure that i don't delete anything else than the enclosing tag.

I'm working my way through tutorials and examples but have a long way to go 
to figure this out on my own, so maybe one of you has a way to do this ?

many thx in advance for your help.

-- 
This is the BBEdit Talk public discussion group. If you have a 
feature request or need technical support, please email
"supp...@barebones.com" rather than posting to the group.
Follow @bbedit on Twitter: <https://www.twitter.com/bbedit>
--- 
You received this message because you are subscribed to the Google Groups 
"BBEdit Talk" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to bbedit+unsubscr...@googlegroups.com.
To post to this group, send email to bbedit@googlegroups.com.
Visit this group at https://groups.google.com/group/bbedit.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/bbedit/8e61cb6a-f852-4794-b360-8def8e6b74d8%40googlegroups.com.

Reply via email to