Page 1 of 1

XML Elements delete

Posted: Mon May 13, 2013 10:11 pm
by mhaegele
Hello,
I have this XML-file
<Annotation about="www.medinfo.de/*" timestamp="0x0004ac47f7fc01cc" href="ChB3d3cubWVkaW5mby5kZS8qEMyD8L__iKsC">
<Label name="_12345" />
<AdditionalData attribute="original_url" value="www.medinfo.de" />
</Annotation>
<Annotation about="www.brustkrebs-info.de/*" timestamp="0x0004abb3c0c8ce1c" href="Chh3d3cuYnJ1c3RrcmVicy1pbmZvLmRlLyoQnJyjhrz2qgI">
<Label name="_543" />
<AdditionalData attribute="original_url" value="www.brustkrebs-info.de" />
</Annotation>
<Annotation about="www.iqtg.de/*" score="1" timestamp="0x0004ab1636200d27" href="Cg13d3cuaXF0Zy5kZS8qEKeagLHj4qoC">
<Label name="_12345" />
<AdditionalData attribute="original_url" value="www.iqtg.de" />
</Annotation>
and I need to delete all XML-Elements with the <label Name="_543" />

Is there a chance to do this with Textpipe?

The result should be
<Annotation about="www.medinfo.de/*" timestamp="0x0004ac47f7fc01cc" href="ChB3d3cubWVkaW5mby5kZS8qEMyD8L__iKsC">
<Label name="_12345" />
<AdditionalData attribute="original_url" value="www.medinfo.de" />
</Annotation>
<Annotation about="www.iqtg.de/*" score="1" timestamp="0x0004ab1636200d27" href="Cg13d3cuaXF0Zy5kZS8qEKeagLHj4qoC">
<Label name="_12345" />
<AdditionalData attribute="original_url" value="www.iqtg.de" />
</Annotation>

Thank your for your hint.

Sincerely
Michael

Re: XML Elements delete

Posted: Tue May 14, 2013 8:49 am
by DataMystic Support
Isn't this just a search/replace of

Code: Select all

<label Name="_543" />
replace with nothing?

Use an Exact search/replace, and you may want to add an extra cr/lf after the text above to remove the extra line feed.