TechWhirl (TECHWR-L) is a resource for technical writing and technical communications professionals of all experience levels and in all industries to share their experiences and acquire information.
For two decades, technical communicators have turned to TechWhirl to ask and answer questions about the always-changing world of technical communications, such as tools, skills, career paths, methodologies, and emerging industries. The TechWhirl Archives and magazine, created for, by and about technical writers, offer a wealth of knowledge to everyone with an interest in any aspect of technical communications.
Re: Batch search & replace according to a text file
Subject:Re: Batch search & replace according to a text file From:Geoff Lane <geoff -at- gjctech -dot- co -dot- uk> To:techwr-l -at- lists -dot- techwr-l -dot- com Date:Wed, 23 Nov 2005 23:39:10 +0000
On Wednesday, November 23, 2005, Broberg, Mats wrote;
> Dear all,
> I need to search for approx. 250 different expressions in each and
> one of approx. 5,000 different XML files. For each match, I need the
> function to replace the expression with another expression that can
> be specified in an external text file (where also each original
> expression is stated). The expression is an if-clause that is
> surrounded by special tags, so there is no risk expressions in the
> body text will be replaced.
> I suppose this could be done by a script or something like that? Any
> script experts out there?
---
This should be straightforward in VBScript, VBA, PHP, and a few other
languages. For VBScript and VBA, check out the FileSystemObject
object, Folder and File objects, and their properties and methods.
Which languages do you have available? Can you give a clearer idea of
the tags, and so how to identify the content to be replaced? Can you
give a specification for the external text file?
Now Shipping -- WebWorks ePublisher Pro for Word! Easily create online
Help. And online anything else. Redesigned interface with a new
project-based workflow. Try it today! http://www.webworks.com/techwr-l
Doc-To-Help 2005 now has RoboHelp Converter and HTML Source: Author
content and configure Help in MS Word or any HTML editor. No
proprietary editor! *August release. http://www.componentone.com/TECHWRL/DocToHelp2005
---
You are currently subscribed to TECHWR-L as archive -at- infoinfocus -dot- com -dot-