Archive of UserLand's first discussion group, started October 5, 1998.
Re: XML markup of large text file
Author: Yegor Malov Posted: 6/16/1999; 10:26:30 AM Topic: XML markup of large text file Msg #: 7448 (In response to 7433) Prev/Next: 7447 / 7449
I think you can do without writing a script here. I would use some powerful text editor to do the job, i.e. MS Word.
The idea in general is to replace delimiters with pieces of XML code. In your case there's a bit of a problem with delimiters - how to know the first colon from the second in every line to do the right substitution.
In MS Word I would do the following (but I suppose it can be done in in any word processor that supports tables):
now the first category is separated with double colon, i.e.
- select all the text
- convert it to table with colon as the delimiter
(now we get level 1 categories in the first column of a table, level 2 - in the second, etc)
- insert an empty column after the first one
- select all the table
- convert it back to text, use any delimiter, you might use the colon as well
Europe:: UK: Scotland
and you can replace easily now
Please contact me in case you have any difficulties with this
There are responses to this message:
- Re: XML markup of large text file, Robert Brook, 6/17/1999; 10:14:33 AM
This page was archived on 6/13/2001; 4:50:50 PM.
© Copyright 1998-2001 UserLand Software, Inc.