Page 1 of 1

Handling XML document as INPUT FILE

Posted: Mon Aug 09, 2004 10:13 am
by murur
I am trying to develop a POC which take input datafiles in XML format.

1) I have a sample XML file and able to import the meta data. no issue

2) I want to read the XML file as input data file and write to a sequential file. Could you pl. tell me how to do that. What "stage" I have to use to implement this?

I have tried with XML Input Stage under (RealTime) group. There is no place I can mention the Path and file name about input files.

Thank you,

Posted: Mon Aug 09, 2004 10:37 am
by tonystark622
murur,

I suspect that the folder or sequential file stage is what you need to specify the filename/path. You can view the documentation for the XML stages in your c:\Program Files\Ascential\DataStage\Docs directory. The filename is 'XMLPACK_20_Designer.pdf'.

Good luck!

Tony

Posted: Mon Aug 09, 2004 11:34 am
by chulett
From what I understand, you should use the Folder stage in conjunction with (to feed) the XML Input stage. Works well as long as the XML files are not "too big".

Posted: Mon Aug 09, 2004 12:35 pm
by larryoceanview
I was having the same problems last week,

check this post:

viewtopic.php?t=88040

Larry

Posted: Tue Aug 10, 2004 2:02 pm
by rkumar28
Hi Muroor....

There are couple of ways to read XML file. You can use sequential file stage, Folder Stage or XML Transformer Stage.
I am using the Folder Stage to read the XML file. In the folder stage under the columns....there will be two columns one with the name of the source XML file and the other is the record. It is the record column that will actually be containing all the XML data to be parsed in the XML Input stage.
Also, in folder stage in the Properties Tab under OutPut Tab make the wild card soemthing like *YOURXMLFILENAME*.

In XML Input stage...in XMLSOURCE under Input column.....choose the record column and check XML document button.

Also, If your Source XML file is big and the data is bigger than the record column can handle in folder stage....I will suggest using the Folder stage to pass the URL path to the XML file...In this case you will not be having the 'record' column at all in folder stage. XMLInput stage you will need to check the 'URL/FilePath' button....

I hope this helps....

Thanks.....

Posted: Tue Aug 10, 2004 6:17 pm
by vmcburney
I was processing a very large XML file and found the folder stage wouldn't work regardless of whether you passed the record or the URL filename. The XML Input stage still tries to load up the entire XML document and aborts when it hits the 2M limit. I ended up processing it through the sequential file stage.