XML Input Stage Problem
Moderators: chulett, rschirm, roy
XML Input Stage Problem
Hi,
I have a server job that reads xml data in a single record through a sequential file and then converts this raw input into XML using the XML Input Stage and then a bit simple transform in BASIC transformer and then the final output to a file.
The problem here is that no records are being output from the XML Input stage. i can see that the records are being read by Sequential stage and then input to the XML. But the no records are written out of the XML stage. The job finishes without even a warning.
Can anybody through light on this?
I have a server job that reads xml data in a single record through a sequential file and then converts this raw input into XML using the XML Input Stage and then a bit simple transform in BASIC transformer and then the final output to a file.
The problem here is that no records are being output from the XML Input stage. i can see that the records are being read by Sequential stage and then input to the XML. But the no records are written out of the XML stage. The job finishes without even a warning.
Can anybody through light on this?
Rajeev
Nobody knows Everything,
But U should not be the One who knows Nothing.
Nobody knows Everything,
But U should not be the One who knows Nothing.
Yes this is a server job but i think at this point the XML stage is the issue. Tried the same in a Parallel still gives the same problem.VCInDSX wrote:Hi rajeevn80,
This post actually belongs to the Server forum.... because you have mentioned "Server" in your post header...
Cheers!!!
Rajeev
Nobody knows Everything,
But U should not be the One who knows Nothing.
Nobody knows Everything,
But U should not be the One who knows Nothing.
No, the issue seems to be the fact that you don't know what XPath Expressions are.
They do all the dirty work in the stage and tell it how to parse the elements out that you want from the XML. They are generated for you automatically when you import the metadata from your source xml or better yet the .xsd - did you do that?
Specifically, they are the expressions in the Output Columns tab Description column and look something like this:
elementName/text()
They do all the dirty work in the stage and tell it how to parse the elements out that you want from the XML. They are generated for you automatically when you import the metadata from your source xml or better yet the .xsd - did you do that?
Specifically, they are the expressions in the Output Columns tab Description column and look something like this:
elementName/text()
-craig
"You can never have too many knives" -- Logan Nine Fingers
"You can never have too many knives" -- Logan Nine Fingers
yes i did import the metadata from a .xsd file. After the metdata import the output columns tab description had '/defns' appended to each level-
eg.
"/defns:BACSDocument/defns:Data/defns:ISCDDocument/Version/text()"
When i ran the job it aborted indicating '/defns:' as the problem.
I compared the new metadata with an old xml one and found out that the old one did not have any '/defns' in description. So i manually removed the 'defns:' to make it as
eg.
"/BACSDocument/Data/ISCDDocument/Version/text()"
Now the job runs to a completion with no errors but no records output from the XML input stage.
eg.
"/defns:BACSDocument/defns:Data/defns:ISCDDocument/Version/text()"
When i ran the job it aborted indicating '/defns:' as the problem.
I compared the new metadata with an old xml one and found out that the old one did not have any '/defns' in description. So i manually removed the 'defns:' to make it as
eg.
"/BACSDocument/Data/ISCDDocument/Version/text()"
Now the job runs to a completion with no errors but no records output from the XML input stage.
Rajeev
Nobody knows Everything,
But U should not be the One who knows Nothing.
Nobody knows Everything,
But U should not be the One who knows Nothing.
-
- Participant
- Posts: 612
- Joined: Thu May 03, 2007 4:59 am
- Location: Melbourne
Refer THIS link for a small example to understand the concept
Last edited by JoshGeorge on Thu Sep 20, 2007 7:30 am, edited 1 time in total.
Joshy George
<a href="http://www.linkedin.com/in/joshygeorge1" ><img src="http://www.linkedin.com/img/webpromo/bt ... _80x15.gif" width="80" height="15" border="0"></a>
<a href="http://www.linkedin.com/in/joshygeorge1" ><img src="http://www.linkedin.com/img/webpromo/bt ... _80x15.gif" width="80" height="15" border="0"></a>
To get rid of the "defns" prefix, do the following.rajeevn80 wrote: I compared the new metadata with an old xml one and found out that the old one did not have any '/defns' in description. So i manually removed the 'defns:' to make it as
eg.
"/BACSDocument/Data/ISCDDocument/Version/text()"
1. Launch XML Metadata Importer
2. Import the XSD
3. Open "View" menu and select "Namespaces"
4. Here you will see "Prefix" textbox and an "Always Qualify" check box. Uncheck this box. It will show a warning message. Dismiss it.
5. This should remove the "defns:" prefix from your schema.
Time and again, as everybody else, I would like to refer you Duke's wonderful page with this "XML Best Practices document" for a good understanding of the XML stages.
http://www.duke-consulting.com/Download ... ctices.zip
NOTE: This "feature" is not seen in version 8.0.[/i]
Good luck,
-V
Great points by all.... it's also worth emphasizing that you should always follow Craig's advice and look carefully at your actual XML instance document sample that you are trying to read, and compare it against your XPath....just to be sure there were no inconsistencies between your xsd and your particular document.
Ernie
Ernie