help a newbie? problem with collections

In searching for two days for a simple, easy to use tool to be used locally to pull some data from a collection of .msml xml files, I have had the greatest luck with QUIP. I was hoping to get the last bit of help i need to finish this off (please keep in mind, i’m not much if anything of a programmer, and i have a very basic understanding of xml, xquery and quip.)

I have a collection of xml files locally stored on this windows 2000 machine. I would like to pull out, from each file, 3 tags. I have the query for pulling these 3 tags from a particular file working properly if i name a particular file (in filesystem mode, directory J:\state)

for $b in document(“129339411.621.msml”)/MissionState/Settings/Setting
where $b/@name = "INSTRUMENT_NAME"

but my goal is to pull it from every .msml file in the directory.
In trying :
for $b in collection(“J:\state”)/MissionState/Settings/Setting
where $b/@name = "INSTRUMENT_NAME"

…nothing is returned.

I can see from the logfile that it is (i think) finding the files i wanted it to:


but it doesn’t seem to be processing them in the same way that it processed the individual “in document(“blahblah”)” query.

Is there a particular step (another FWR statement to go stepwise through each file in the collection?) that i need to add, or is am i just not understanding the usage of the collection statement within query entirely?

I really appreciate any help you can give, as my own search has led me down many blind alleys.
Also, am i’m missing some obivous other tool to do this type of simple search, or is xquery/quip the tool i should be using?

daniel crotty

Hi Daniel,

please ensure that QuiP is running in the ‘File system mode’, i.e.
‘quip -file_system something.query’ when running QuiP from the command
line or using the GUI, it should be a button to check somewhere.

From the QuiP docu:
The collection name is interpreted as a directory name. The collection function returns all XML documents contained in .xml files within this folder.

In your case the fact that your files are not suffixed ‘xml’ might be the