Hi,
I'm trying to read an xml document which has multiple lines of xml. Each line is an xml document. In the XMl Source tab of Input link properties of XML Input Stage, I specify the column as file path, and create such a file which has the XML document file path.
Here is my problem.
If the XML document only has one line which mean one XML record, then I can extract the info. But if it two lines, which means there are two XMl records, then I'm not able to extract both records. Can anyone help me on this? thanks
XML Input Stage Question
Moderators: chulett, rschirm, roy
Hi,
There is a Sequential File stage before the XML Input Stage, which reads a file that only contains the file path of the XML document. when it comes to the XML Input stage, I specify that column from the link of that Sequential File Stage as a URL/File path. That's how I can extract one XML record from that XML document. The scenario is this XML document has one XML record per line, as it was created by an XML Output Stage using the Output mode of single row.
My problem here is if that XMl document has two or more lines, how can I extract each line into one row.
Thank you.
There is a Sequential File stage before the XML Input Stage, which reads a file that only contains the file path of the XML document. when it comes to the XML Input stage, I specify that column from the link of that Sequential File Stage as a URL/File path. That's how I can extract one XML record from that XML document. The scenario is this XML document has one XML record per line, as it was created by an XML Output Stage using the Output mode of single row.
My problem here is if that XMl document has two or more lines, how can I extract each line into one row.
Thank you.
I use a combination of External Source stage to provide the name of the xml file, then use that file name in an XML Input stage to start reading it. Since it was my very first XML job, I kept it simple, using Unix ls to grab the file name. If you have a file of file names inside of it, I believe you could use Unix cat instead, which just reads each line in the file you name.
Other have more experience with this than I do, so you should get further advice. In the meantime, it can't hurt to experiement.
Other have more experience with this than I do, so you should get further advice. In the meantime, it can't hurt to experiement.
Franklin Evans
"Shared pain is lessened, shared joy increased. Thus do we refute entropy." -- Spider Robinson
Using mainframe data FAQ: viewtopic.php?t=143596 Using CFF FAQ: viewtopic.php?t=157872
"Shared pain is lessened, shared joy increased. Thus do we refute entropy." -- Spider Robinson
Using mainframe data FAQ: viewtopic.php?t=143596 Using CFF FAQ: viewtopic.php?t=157872