Page 1 of 2

Reg. XML Input

Posted: Tue Feb 07, 2006 3:28 am
by raj_konig
Folks,

I am working on XML input to load data from XML file to DB2.

I have gone thru the forum and got some information with that i did the job. I am successfull in compiling the job. But when I tryto run this its a success but i am not able to load data into the target table.

my job is as follows:

FOLDER--->XML INPUT---->DATABASE TABLE

I set the folder stage with only 2 columns as this is not accepting more than 2 and one of them is a key. and for this the NLS is set to NONE.

IN XML INPUT i am not validating the i/p XML file and loaded the name space decalration from table definitions of XML file.

I checked "Repitition Element Required" and set my key field.In advanced tab i have laoded the stylesheet thru URL/FilePath.

My database NLS is set to UTF-8(As specified in PDF)

when I run this i can c the reocrds are read from folder stage to XML input stage but 0 rows are instered from XML Input to DAtabase table.

Please help me out

Thanks in advance

rajesh

Posted: Tue Feb 07, 2006 3:52 am
by raj_konig
The following is the error I am getting when I log the reject error:

"XML input document parsing failed. Reason: Xalan fatal error (publicId: , systemId: , line: 1, column: 1): Invalid document structure"

How could I solve this.

Thanks in Advance
rajesh

Posted: Tue Feb 07, 2006 4:04 am
by ArndW
Raj,

have you tried opening up the XML document in your xml-enable browser or by using one of the many structure-checking utilities available on the market to make sure that your document is well-formed?

Posted: Tue Feb 07, 2006 4:04 am
by balajisr
It seems that XML is not formed correctly.

--Balaji S.R

Posted: Tue Feb 07, 2006 4:35 am
by raj_konig
I opend it in Internet Explorer. It seems fine.

How can I check whether the input XML is correctly formatted or not?

Thanks,
rajesh

Posted: Tue Feb 07, 2006 4:42 am
by ArndW
There are so many ways available to check this. Try using this web page to cut-and-paste your XML to see if it is well-formed. I suspect that it isn't.

Posted: Tue Feb 07, 2006 4:44 am
by balajisr
When you can open the XML correctly in IE means that your xml is right otherwise IE would specify error.

--Balaji S.R

Posted: Tue Feb 07, 2006 5:50 am
by raj_konig
Thank you Arndw for providing information.

I checked my file with that of the link u provided. it says well formed.

So wht could be the error? :?


rajesh

Posted: Tue Feb 07, 2006 5:53 am
by ArndW
Can you try making a copy and changing the job to work without the folder stage and loading the one XML you already checked to see if the error remains?

Posted: Tue Feb 07, 2006 6:34 am
by raj_konig
XML input should have one input stage. if I remove this folder stage, job will throw an error.

or else can i replace this folder stage with any other stage?

rajesh

Posted: Tue Feb 07, 2006 6:44 am
by vijayindukuri
Hi
Have u imported the fields using xml meta data importer and let me know what have u done in your xml input stage .
Thank you
vijay

Posted: Tue Feb 07, 2006 6:51 am
by ArndW
I would normally suggest just using a sequential file input. Can you post the first 10 lines or so of your XML?

Posted: Tue Feb 07, 2006 8:23 am
by raj_konig
YEs Vijay I have imported my fileds using XML Metadata Importer only. While doing so I checked the text of the columns(LAst node of the tree).

Following is how i configured my XML INPUT Plugin

In XML Imput Stage:

IN STAGE TAB
GENERAL: Nothing has been checked.
TRANSFORMATION SETTINGS: CHECKED "REPITITION ELEMENT REQUIRED". CHECKED "INCLUDE NAMESPACE DECLARATION" and loaded information from table definitions.

IN INPUT TAB
XML SOURCE: selected on of the two columns in folder stage.
COLUMN CONTENT: "URL/FILE PATH"

IN OUTPUT TAB
GENERAL: Nothing has been checked
TRANSFORMATION SETTINGS: CHECKED"INHERIT STAGE PROPERTIES"
ADVANCED: NOTHING HAS BEEN CHECKED
COLUMNS: IMPORTED COLUMNS FROM TABLE DEFINITIONS

Thanks,
rajesh

Posted: Tue Feb 07, 2006 9:03 am
by kalpna
Hi! Arnd
How should we configure the xml stage,if we use a sequential file instead of a folder stage.
assuming xml goes like this...

<?xml version="1.0" encoding="ISO-8859-1" ?>
- <messageListFromWcs xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:noNamespaceSchemaLocation="WcsToHost.xsd">
<datetime>2006-01-18T14:40:34</datetime>
<sequenceNo>00000598</sequenceNo>
- <purchaseOrdersToBW>
<extractDate>2006-01-18</extractDate>
<poNum>638508</poNum>
<poSplitNum>02</poSplitNum>
<sapDcSiteCode>D985</sapDcSiteCode>
<supplier>500362</supplier>
<orderDate>2006-01-18</orderDate> .......

Thanks
kalpna

Posted: Tue Feb 07, 2006 9:06 am
by kalpna
hi! Raj
I have similar problem with my job..
please!, let me know if you solve it.
but,in INPUT tab, i am using COLUMN CONTENT as XML Document

Thanks
Kalpna