Page 1 of 1

Parsing multiple XML files

Posted: Mon Mar 31, 2008 1:37 pm
by rroy2
Hi,

I have to parse multiple XML files named as replyfile*.xml (using wildcard as the files have a datetime stamp in the name).

I tried 2 designs

1.
External Source Stage -----> XML Input stage ------> SEQL file

and gave following command in external source stage: ls /directory/replyfile*.xml

Although it did send the required filenames to XML Input stage but the XML stage could not parse multiple files and gave 0 records as output.(XML Source set as 'filepath')

2.
SEQL File stage ------> XML Input stage -------> SEQL File stage

The first SEQL file stage is to read XML file pattern (i.e. all the files together in one go).....but again the XML Input stage could not parse it.

Is there any property which I am missing here, or something I am not doing correctly? If its one file the parsing is successful using Design 1, so no problem with the xpaths.
OR is there a better approach to process multiple files (note: I am not allowed use loops in job sequencer)

Thanks
roy

Posted: Mon Mar 31, 2008 1:55 pm
by jatayl
First I would say, Post this under the correct Forum since it is a EE related design.

Actually, I've designed a job using both the external source stage and the sequential file stage. I would probably stick with the sequential file stage. You just need to pass the path name of the actual xml file, and then reference that path in the URL/Path Name for the input. Your output will contain the xpaths for the data you want to parse. Just make sure you use a repetitive field.

Jason

Posted: Mon Mar 31, 2008 5:08 pm
by eostic
Make sure that you can at least read "one" of the files...and if you are not getting any errors, but zero rows, review your XPath carefully...it's nearly always the ultimate culprit.

Ernie

Posted: Tue Apr 01, 2008 3:43 pm
by rroy2
Thx Ernie....

Yeah it was a very minor problem with the xpaths. Works fine now.

Thanks
roy