Archive of UserLand's first discussion group, started October 5, 1998.
textToXml script for Frontier 6
Author: Dave Winer Posted: 6/17/1999; 9:36:34 AM Topic: Scripts to produce Channel files? Msg #: 7516 (In response to 7483) Prev/Next: 7515 / 7517
OK, I have the example script ready to go.Input file
First, here's a link to the input file. Please do a View Source on the file, since it's a text file, your web browser may wrap it in a funny way. The formatting of the text is important.
http://nirvana.userland.com/misc/myUserLandDemo/inputFile.txt
Output file
Next, here's the XML file the script produces. Again it might be necessary to View Source to get an accurate representation of the file.
http://nirvana.userland.com/misc/myUserLandDemo/outputFile.xml
The script
Here's the source code of the script that converts the .txt file into the .xml file:
http://pointers.userland.com/textToXmlScript
Format of the text
A few comments on the formatting of the text.
Each section is separated by a pair carriage-return-linefeeds.
The text can contain markup, but it will be neutered on processing
Character Is replaced with & & < < > > s are treated specially, they are stripped out and used to build the part of the
- .
Groundrules
If you're going to convert this script to another language or environment, please put a copy of the script on your server and post a pointer in the DG. Don't try to paste the text of the script into a DG message, it'll mangle it for sure. Thanks!
There are responses to this message:
- Re: textToXml script for Frontier 6 (perl version), Jamie Scheinblum, 6/17/1999; 10:22:08 AM
- Re: textToXml script for Frontier 6, Steve Zellers, 6/17/1999; 2:46:11 PM
- PHP textToXml script, Adam Trachtenberg, 6/17/1999; 8:13:11 PM
- Java textToXml Class, Josh Lucas, 6/18/1999; 11:17:04 AM
- Re: textToXml script for Frontier 6, Lindsay Marshall, 6/29/1999; 6:06:26 AM
- Re: textToXml script for Frontier 6, Mark Nottingham, 7/26/1999; 6:50:44 PM
- Re: textToXml script for Frontier 6, David A. Mundie, 9/7/1999; 6:34:46 PM
- Re: textToXml script for Frontier 6, David Theige, 10/12/1999; 2:12:47 PM
This page was archived on 6/13/2001; 4:50:53 PM.
© Copyright 1998-2001 UserLand Software, Inc.