Edit: too much going on...all the XML references below should be json instead...
The original question also asked about using a folder name from the XML data. That folder contains a CSV file with the actual data. The folder name is in a column with a name like Infoes.Name. The dotted name represents a nested path in the XML tree. You can use that to open a file in the folder.
I recommend using the text import peview to create a source script that you can copy from the imported table. The script will look something like this (use right-click->edit on source to get a copy):
Text import preview source script
Open(
"C:\Users\v1\Desktop\stories.csv",
columns(
...
),
Import Settings(
...
)
)
You can replace the quoted filename on the second line with a JSL variable that contains the name of the file you actually need. I don't know if your XML file contains only one file or more than one; you might use something like this to process all of them.
For( irow = 1, irow <= N Rows( dtXML ), irow++,
filename = dtXML:Infoes.Name[irow] || "\data.csv";
show(filename); // check the log to see if this looks right
dtCSV = Open( filename, columns(...), Import Settings(...) );
// do something with the data
// ... maybe dtCSV<<Distribution(...) for example
// then close the table...
Close( dtCSV, "nosave" );
)
You'll need to think about the \ in the path name which I just stuck in front of the hard-coded data.csv name, and you might need to get the actual file name from another variable. Since there is more than one data table open, be sure to use distinctive JSL variable names to prevent confusion, and be sure to use the JSL variable name to avoid using the current data table, since it will not be obvious what table is current.
Craige