Where to Start with pipe delimited file filtering
I have a file supplied to me by a vendor in either xml format, or pipe delimited format. What I need to do is read all of the data in and filter out any inactive products. The pipe file in column is where the the product is set to active, either 0,1. Finally I will write the file to a new pipedelimited csv.
1.) would xml be easier?
2.) How do I start with this?
Here is a sample of some data in the pipe file.
model|name|price|category|loc|image|description|we ight|option_type|option_value|suggested_retail|spe cial_handling|manufacturer|manufacturer_code|packa ging|in_stock|last_updated|active|
ABC123|ABC name|2.45|Tools||image.jpg|ABC Tool|3.2|||6.99|YES|Great Tool Company|1-ABC123|Yes|02-01-2010|1|
This is what I want to do:
skip row 1
read each row, if active=1 and there is any information in option_type ,write each row to "activewith options.csv"
then skip row 1,
read if active=1 and option_type is blank, write each row to "active with out options.csv
|All times are GMT +5.5. The time now is 06:44.|