
Hi Skunks/ettes, Am looking for an app that can convert a txt to xml after a given duration using custom xml tags that does not involve any scripting. Any ideas?

On Wed, Feb 24, 2010 at 10:40 AM, albert kamau <kamau.albert@gmail.com> wrote:
Am looking for an app that can convert a txt to xml after a given duration using custom xml tags that does not involve any scripting. Any ideas?
You need to provide more information -- What kind of text file is it ? Does it have some structure ? Is it a CSV file - is the text information in the file stored as comma separated values ?

The elements that should appear on the xml are separeted by a hyphen. Its a simple txt file. No additional markup(see below) *author.txt* JRtolkien - lord of the rings *author.xml* after conversion should look like below <?xml version="1.0" encoding="iso-8859-1"?> <library> <author name="JRTolkien" book="Lord of the rings " /> </library> On Wed, Feb 24, 2010 at 11:06 AM, <ashok+skunkworks@parliaments.info<ashok%2Bskunkworks@parliaments.info>
wrote:
On Wed, Feb 24, 2010 at 10:40 AM, albert kamau <kamau.albert@gmail.com> wrote:
Am looking for an app that can convert a txt to xml after a given
duration
using custom xml tags that does not involve any scripting. Any ideas?
You need to provide more information --
What kind of text file is it ? Does it have some structure ? Is it a CSV file - is the text information in the file stored as comma separated values ? _______________________________________________ Skunkworks mailing list Skunkworks@lists.my.co.ke http://lists.my.co.ke/cgi-bin/mailman/listinfo/skunkworks ------------ Skunkworks Server donations spreadsheet
http://spreadsheets.google.com/ccc?key=0AopdHkqSqKL-dHlQVTMxU1VBdU1BSWJxdy1f... ------------ Skunkworks Rules http://my.co.ke/phpbb/viewtopic.php?f=24&t=94 ------------ Other services @ http://my.co.ke Other lists ------------- Announce: http://lists.my.co.ke/cgi-bin/mailman/listinfo/skunkworks-announce Science: http://lists.my.co.ke/cgi-bin/mailman/listinfo/science kazi: http://lists.my.co.ke/cgi-bin/mailman/admin/kazi/general

On Wed, Feb 24, 2010 at 11:24 AM, albert kamau <kamau.albert@gmail.com> wrote:
author.txt
JRtolkien - lord of the rings
<?xml version="1.0" encoding="iso-8859-1"?> <library> <author name="JRTolkien" book="Lord of the rings " /> </library>
If you running linux ... or you have cygwin and sed installed on windows -- the following command will give you your desired output -- echo '<?xml version="1.0" encoding="iso-8859-1"?><library>' $(cat author.txt | sed 's/[ ]*-/-/g' | sed 's/-[ ]*/-/g' | sed 's/.*/<author name="&/' | sed 's/.*/&"\/>/' | sed 's/-/" book="/') "</library>" > author.xml it works by piping outputs - and changing outputs at each step ... first we output the header - <?xml version="1.0" encoding="iso-8859-1"?><library> then we output the text file author.txt - cat author.txt prev output is piped to - sed 's/[ ]*-/-/g' | sed 's/-[ ]*/-/g' - which trims the white space around the "-" separator prev output is piped to prefix the starting xml tag '<author name="' before the string prev output is piped to suffix the ending xml tag ' " /> ' prev output is piped to replace the "-" character with the closing of the 1st attrribute the attribute name of the 2nd attribute... ' " book-" ' to get the final ouput

what you are asking for does not exist. you need to script to do the above On Wed, Feb 24, 2010 at 10:40 AM, albert kamau <kamau.albert@gmail.com>wrote:
Hi Skunks/ettes,
Am looking for an app that can convert a txt to xml after a given duration using custom xml tags that does not involve any scripting. Any ideas?
_______________________________________________ Skunkworks mailing list Skunkworks@lists.my.co.ke http://lists.my.co.ke/cgi-bin/mailman/listinfo/skunkworks ------------ Skunkworks Server donations spreadsheet
http://spreadsheets.google.com/ccc?key=0AopdHkqSqKL-dHlQVTMxU1VBdU1BSWJxdy1f... ------------ Skunkworks Rules http://my.co.ke/phpbb/viewtopic.php?f=24&t=94 ------------ Other services @ http://my.co.ke Other lists ------------- Announce: http://lists.my.co.ke/cgi-bin/mailman/listinfo/skunkworks-announce Science: http://lists.my.co.ke/cgi-bin/mailman/listinfo/science kazi: http://lists.my.co.ke/cgi-bin/mailman/admin/kazi/general

@Humphrey I had an app that did this before my disk crashed. I used firedeamon to convert the process to a service. Cant remember the name of the app as it run in the background. And google is giving me java applications that I have not time to use. Kind regards Albert Kamau -------------------------------------------------------------------- Landline : 020 2074667 | Zain : 0731 275678 | Saf : 0725 078797 On Wed, Feb 24, 2010 at 11:24 AM, Humphrey Ngoiya <hngoiya@yahoo.co.uk>wrote:
what you are asking for does not exist. you need to script to do the above
On Wed, Feb 24, 2010 at 10:40 AM, albert kamau <kamau.albert@gmail.com>wrote:
Hi Skunks/ettes,
Am looking for an app that can convert a txt to xml after a given duration using custom xml tags that does not involve any scripting. Any ideas?
_______________________________________________ Skunkworks mailing list Skunkworks@lists.my.co.ke http://lists.my.co.ke/cgi-bin/mailman/listinfo/skunkworks ------------ Skunkworks Server donations spreadsheet
http://spreadsheets.google.com/ccc?key=0AopdHkqSqKL-dHlQVTMxU1VBdU1BSWJxdy1f... ------------ Skunkworks Rules http://my.co.ke/phpbb/viewtopic.php?f=24&t=94 ------------ Other services @ http://my.co.ke Other lists ------------- Announce: http://lists.my.co.ke/cgi-bin/mailman/listinfo/skunkworks-announce Science: http://lists.my.co.ke/cgi-bin/mailman/listinfo/science kazi: http://lists.my.co.ke/cgi-bin/mailman/admin/kazi/general
_______________________________________________ Skunkworks mailing list Skunkworks@lists.my.co.ke http://lists.my.co.ke/cgi-bin/mailman/listinfo/skunkworks ------------ Skunkworks Server donations spreadsheet
http://spreadsheets.google.com/ccc?key=0AopdHkqSqKL-dHlQVTMxU1VBdU1BSWJxdy1f... ------------ Skunkworks Rules http://my.co.ke/phpbb/viewtopic.php?f=24&t=94 ------------ Other services @ http://my.co.ke Other lists ------------- Announce: http://lists.my.co.ke/cgi-bin/mailman/listinfo/skunkworks-announce Science: http://lists.my.co.ke/cgi-bin/mailman/listinfo/science kazi: http://lists.my.co.ke/cgi-bin/mailman/admin/kazi/general
participants (3)
-
albert kamau
-
ashok+skunkworks@parliaments.info
-
Humphrey Ngoiya