How to duplicate a dataRecord

Hi, i'm scraping info about some products and the disponibility of them on various cities i need to create an entry on the dataset for each city containing the same information. For example:

Product Reference Location
NoteBook NB12B54 Miami, FL - Los Angeles CA - New York, NY

Should generate 3 entries on dataSet.
NoteBook NB12B54 Miami, FL
NoteBook NB12B54 Los Angeles CA
NoteBook NB12B54 New York, NY

Is there any way i can do that? Something like
DataRecord tmp=dataSet.get(n);
tmp.setValue("location","Los Angeles,CA");
dataSet.put(tmp);
tmp.setValue("location","New York, NY");
dataSet.put(tmp);

Thank for the help

How to duplicate a dataRecord

I used:

DataRecord dr=dataRecord.clone();
session.log("[Multiple cities found] "+citnm);
dr.put("CityNm","First");
dataSet.addDataRecord(dr);

And its working for me.

Thanks

How to duplicate a dataRecord

KamiloKlauss,

You can use the method dataRecord.put in a manner you're describing. An example of its use can be found within the 6th tutorial [url=http://www.screen-scraper.com/support/tutorials/tutorial6/setting_up_the_scraping_session.php]here[/url]. I would recommend reading in the names of the cities & states as a CSV file using the [url=http://java.sun.com/j2se/1.4.2/docs/api/java/io/BufferedReader.html]BufferedReader[/url] Class rather than setting temp vars.

Our API Documentation:
http://www.screen-scraper.com/support/docs/api_documentation.php

Sun's Hashtable Documentation:
http://java.sun.com/j2se/1.4.2/docs/api/java/util/Hashtable.html

Please let us know if you have any additional questions.

Thanks,
Scott