Page 1 of 1

Issue with data extraction from XML File

Posted: Tue Oct 12, 2010 8:27 am
by balu536
Hi,
I have a requirement to extract data from XML file and load it to a tab delimitted sequential file.

My design flow is : External Stae --> XML input stage --> Transformaer Stage -->> Sequential File stage.

I imported the meta data,namespace declaration too.
1 row (XML file path) is coming as input to XML input stage and no records are coming as output.

Job ran fine with warnings as shown below.

XSLT Processor: Unknown element on the output. Element Name = "CustomerInfo"
XSLT Processor: Text can only occur as a direct child of a "column" element.

This warning came for all the columns.


PFB the file used.

<?xml version="1.0" encoding="UTF-8" ?>
- <CustomerInfo xmlns:cnt="http://www.ibm.com/schemas/ContactDemo" xmlns="http://www.ibm.com/schemas/SimpleXMLDemo" xmlns:xsd="http://www.w3.org/2001/XMLSchema" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance">
<CustomerID>0000000003</CustomerID>
<CompanyName>Eastway software Inc.</CompanyName>
- <Contacts>
- <cnt:Contact>
<cnt:FirstName>Andy</cnt:FirstName>
<cnt:LastName>Lin</cnt:LastName>
<cnt:Email>AndyLin@eastway.com</cnt:Email>
</cnt:Contact>
- <cnt:Contact>
<cnt:FirstName>Lisa</cnt:FirstName>
<cnt:LastName>Pierce</cnt:LastName>
<cnt:Email>LisaP@eastway.com</cnt:Email>
</cnt:Contact>
</Contacts>
</CustomerInfo>


Please help me in resolving the issue.

TIA.....

Posted: Tue Oct 12, 2010 9:36 am
by chulett
How did you generate the metadata (XPath Expressions) that you used in the stage? From an xsd or something else?

Posted: Tue Oct 12, 2010 9:38 am
by arunkumarmm
Can you tell us how you have defined your Xpath?

Also, I'm not sure but for me it seems like your XML doesnt have the namespace in the right place. And check whether all your columns are defined in your xsd.

Posted: Tue Oct 12, 2010 9:58 am
by balu536
Hi chulett,
I generated Xpath expressions from XSD only....

Posted: Tue Jul 29, 2014 6:31 am
by vasubabu
Hi,

Did you get resolution for this issue? I got the same issue. Could you please explain me if you have solution

Posted: Tue Jul 29, 2014 6:59 am
by chulett
Start your own post. Explain your issue.