Sample Input and Output


We use a simple address book listing for the example for this utility. Each row is an entry for a person. The columns are listed below.

  1. Last name

  2. First name

  3. Street address, first line

  4. Street address, second line

  5. City

  6. State or province

  7. Zip or postal code

  8. Country

  9. Phone number

  10. E-mail address

Here's an address book in this format, with entries.

Sample Input Document (SimpleCSV.xml)
 <?xml version="1.0" encoding="UTF-8"?> <SimpleCSV>   <Row>     <Column01>Jones</Column01>     <Column02>Mary</Column02>     <Column03>312 Renner Road</Column03>     <Column04>Apartment C</Column04>     <Column05>Richardson</Column05>     <Column06>TX</Column06>     <Column07>75080</Column07>     <Column08>USA</Column08>     <Column09>972-996-1051</Column09>   </Row>   <Row>     <Column01>Smith</Column01>     <Column02>Sue</Column02>     <Column03>Highway 118</Column03>     <Column05>Terlingua</Column05>     <Column06>TX</Column06>     <Column07>79852</Column07>     <Column10>desertrat@aol.com</Column10>   </Row>   <Row>     <Column01>Fred</Column01>     <Column02>Finger</Column02>     <Column03>PO Box 999</Column03>     <Column05>Nome</Column05>     <Column06>AK</Column06>     <Column07>99762</Column07>     <Column10>icecube@msn.com</Column10>   </Row> </SimpleCSV> 

Note that none of the rows have data for all ten columns. Column 4 for the second line of the street address, column 8 for the country, column 9 for the phone number, and column 10 for the e-mail address are all optional.

Successful processing should produce a CSV file that looks like this:

 "Jones","Mary","312 Renner Road","Apartment C","Richardson","TX","75080",  "USA","972-996-1051" "Smith","Sue","Highway 118",,"Terlingua","TX","79852",  ,,"desertrat@aol.com" "Fred","Finger","PO Box 999",,"Nome","AK","99762",  ,,"icecube@msn.com" 


Using XML with Legacy Business Applications
Using XML with Legacy Business Applications
ISBN: 0321154940
EAN: 2147483647
Year: 2003
Pages: 181

Similar book on Amazon

flylib.com © 2008-2017.
If you may any questions please contact us: flylib@qtcs.net