Page 1 of 1

How to handle EMPTY XML file as Input

Posted: Tue Sep 24, 2013 5:04 am
by rohit.agarwalin
Hi,

I have a requirement where XML file will be provided with full information (with all the tags) and this file may come as EMPTY file as well.
In case of Empty XML file only file header will be present and XML body part will not be present in file (even tags will not be there).

Could you please advise how to handle this kind of file (as EMPTY file may come any day) and I do not want to have a separate job.

So job should be able to handle both FULL and EMPTY (with only Header) XML file.

Thanks,
Rohit.

Posted: Tue Sep 24, 2013 6:26 am
by eostic
You'll have to play with it...try some different scenarios....not sure if it will get rejected as "not well formed", or just not retreive any data. Is the "header" just the first line of an xml document, <?xml version="1.0" ?> (with nothing else in the file) ....or is it a more formal header "as content" like:

<?xml version="1.0" ?>
<main>
<header>
<stuff/>
</header>

</main

Ernie

Posted: Mon Sep 30, 2013 12:36 am
by arunkumarmm
I dont think that should be a problem. Your job should run fine and extract only the header data.

The detail records, if not found, should finish with zero count.