You have to create an actual DataWindow object... Right now you're just assigning nothing to a DataWindow control and/or DataStore.
Basically, a DataWindow control (the item you place on your window) and/or DataStore are simply containers for the actual DataWindow object. (yes, it's confusing at first... With the DataWindow control and DataWindow object)
You will need to create a new DataWindow in the DataWindow Painter. Since I don't know what version of PB you're using, I can't give you the steps to create a new one. In any version, when you open the Painter, you'll be asked what type you would like to create. In this instance, you're looking to create an external DataWindow. Then, you'll define the columns. Then you'll save it. Then you'll assign your control to the object. (.DataObject property of either DataWindow or DataStore)
The typical naming scheme for DataWindow objects (d_) that I've seen is d_datawindow_name, whereas the DataWindow control (dw_) is typically named like dw_control.
Then, once you have the object assigned to it's container, you can reference the values like so:
String ls_test
Long ll_row
ll_row = dw_1.InsertRow( 0 )
// set value of column named column_name
dw_1.SetItem( ll_row, 'column_name', 'some value' )
// set the value of column #2
dw_1.SetItem( ll_row, 2, 'another value' )
// get the value of the first column
ls_test = dw_1.GetItemString( ll_row, 1 )
MessageBox( 'Column #1...', ls_test )
// use the SaveAs( ) function of the DataWindow/DataStore to export the data to XML.