Deleting certain parts of a multilingual XML file

Questions about XML that are not covered by the other forums should go here.
BartJanssen
Posts: 2

Deleting certain parts of a multilingual XML file

Wed Feb 17, 2016 4:12 pm

Hello all,

I'm fairly new to Oxygen, and I've been fiddling around now.

I'm working on a multilingual XML file, which contains Dutch, French, German and English.
I need to extract the French, German and English strings from the file, so only the Dutch remains.

What I'm looking for, is some kind of 'wildcard' search to find any text between a couple of tags.

They look like this:
<text_eng>Step 2: Check and approve resend</text_eng>

Basically, I wish to find all occurrences of <text_eng>...</text_eng> and delete those.
How do I prepare the wildcard search for this?

Thanks, any help is more than welcome!

Bart
adrian
Posts: 2443

Re: Deleting certain parts of a multilingual XML file

Thu Feb 18, 2016 3:48 pm

Hello,

If you prefer the text search, you can make use of regular expressions for wildcards in the Find/Replace dialog (Find > Find/Replace).
Find: <text_eng>.*?</text_eng>
Replace with: <leave empty>
Options [x]Regular expression
If you want to also remove line breaks and indents (whitespaces) add \s+ at the beginning of the find expression (before the start tag).

Regards,
Adrian
Adrian Buza
<oXygen/> XML Editor, Schema Editor and XSLT Editor/Debugger
http://www.oxygenxml.com
BartJanssen
Posts: 2

Re: Deleting certain parts of a multilingual XML file

Thu Feb 18, 2016 4:09 pm

Hello Adrian,

Works like a charm, thank you SO much!

Bart

adrian wrote:Hello,

If you prefer the text search, you can make use of regular expressions for wildcards in the Find/Replace dialog (Find > Find/Replace).
Find: <text_eng>.*?</text_eng>
Replace with: <leave empty>
Options [x]Regular expression
If you want to also remove line breaks and indents (whitespaces) add \s+ at the beginning of the find expression (before the start tag).

Regards,
Adrian

Return to “General XML Questions”

Who is online

Users browsing this forum: No registered users and 2 guests