Issue with data extraction from XML File

Post questions here relative to DataStage Enterprise/PX Edition for such areas as Parallel job design, Parallel datasets, BuildOps, Wrappers, etc.

Moderators: chulett, rschirm, roy

Post Reply
balu536
Premium Member
Premium Member
Posts: 103
Joined: Tue Dec 02, 2008 5:01 am

Issue with data extraction from XML File

Post 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.....
chulett
Charter Member
Charter Member
Posts: 43085
Joined: Tue Nov 12, 2002 4:34 pm
Location: Denver, CO

Post by chulett »

How did you generate the metadata (XPath Expressions) that you used in the stage? From an xsd or something else?
-craig

"You can never have too many knives" -- Logan Nine Fingers
arunkumarmm
Participant
Posts: 246
Joined: Mon Jun 30, 2008 3:22 am
Location: New York
Contact:

Post 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.
Arun
balu536
Premium Member
Premium Member
Posts: 103
Joined: Tue Dec 02, 2008 5:01 am

Post by balu536 »

Hi chulett,
I generated Xpath expressions from XSD only....
vasubabu
Participant
Posts: 153
Joined: Wed Jan 25, 2006 2:38 am

Post by vasubabu »

Hi,

Did you get resolution for this issue? I got the same issue. Could you please explain me if you have solution
VASU..
chulett
Charter Member
Charter Member
Posts: 43085
Joined: Tue Nov 12, 2002 4:34 pm
Location: Denver, CO

Post by chulett »

Start your own post. Explain your issue.
-craig

"You can never have too many knives" -- Logan Nine Fingers
Post Reply