diff --git a/README b/README index 0e0323c..80182b1 100644 --- a/README +++ b/README @@ -10,14 +10,17 @@ Guile csv reader sudo make install * read csv +```scheme (use-modules (csv)) (define my-csv-reader (make-csv-reader #:\,)) (call-with-input-file "file.csv" my-csv-reader) +``` * csv->xml (call-with-input-file "file.xml" csv->xml) and file.xml could be: +```xml aaa 11 @@ -28,8 +31,10 @@ and file.xml could be: 12 bbb@bbb.com +``` * sxml->csv or csv-write to output a csv format file +```scheme (call-with-output-file "file.csv" (lambda (port) (sxml->csv @@ -37,9 +42,9 @@ and file.xml could be: port))) and file.csv would be: - +```csv name,age,email aaa,11,aaa@aaa.com bbb,12,bbb@bbb.com - +``` Enjoy!