tXMLMAP namespace issue

Seven Stars

tXMLMAP namespace issue

Hi,

 

I am extracting data from XML file. Here is the flow.

 

tXMLInput --> tXMLMap --> tFileoutput

 

in tXMLMap i have field from source 

 

[row2.Filename:/POSLog/Transaction/RetailTransaction/LineItem/xyz:YUMBOHTransactionExtensions/xyzSmiley FrustratedpeedOfService/xyzSmiley SurprisedrderSpeedOfService/xyzSmiley FrustratedOSTransaction/xyz:Event/xyz:EventID/@EventName.]

 

while extracting this field i am getting below error.

 

TPrefix0:RetailTransaction/TPrefix0:LineItem/xyz:YUMBOHTransactionExtensions/xyzSmiley FrustratedpeedOfService/xyzSmiley SurprisedrderSpeedOfService/xyzSmiley FrustratedOSTransaction/xyz:Event/xyz:EventID/@EventName.
Exception: XPath expression uses unbound namespace prefix xyz

 

 

Thanks,
Sid
Mark as solution if this resolved your issue

Accepted Solutions
Community Manager

Re: tXMLMAP namespace issue

Hi
According to the answer of this related problem, you need to add namespace to xyz.
https://stackoverflow.com/questions/14934178/applying-xpath-on-xml-where-namespaces-are-with-childre...
On tXMLMap, right click on xyz and select 'set a namespace' option to add a namespace. Let me know if it resolves the issue.

Regards
Shong
----------------------------------------------------------
Talend | Data Agility for Modern Business

All Replies
Community Manager

Re: tXMLMAP namespace issue

Hi
According to the answer of this related problem, you need to add namespace to xyz.
https://stackoverflow.com/questions/14934178/applying-xpath-on-xml-where-namespaces-are-with-childre...
On tXMLMap, right click on xyz and select 'set a namespace' option to add a namespace. Let me know if it resolves the issue.

Regards
Shong
----------------------------------------------------------
Talend | Data Agility for Modern Business

What’s New for Talend Spring ’19

Watch the recorded webinar!

Watch Now

Agile Data lakes & Analytics

Accelerate your data lake projects with an agile approach

Watch

Definitive Guide to Data Quality

Create systems and workflow to manage clean data ingestion and data transformation.

Download

Tutorial

Introduction to Talend Open Studio for Data Integration.

Watch