• Index
  •  » Talend Open Studio for Data Integration » Usage, Operation
  •  » xml tfileinput parsing question

#1 2009-03-27 21:27:37

tnewman
Member
Company: Lunexa
Registered: 2008-11-15
Posts: 194
Website

xml tfileinput parsing question

Tags: [parse, wizard, xml]

Hi,

I have some input like :-

      <StartPrecal dayOfYear="15">2009-01-15T14:10:00.000</StartPrecal>
      <EndPostcal dayOfYear="15">2009-01-15T23:10:00.000</EndPostcal>

When I use the xml input wizard ( see image ) I get output of 'dayOfYear' = '15', What I actually need is   '2009-01-15T14:10:00.000'.

The dayOfYear number changes, i.e for 2009-01-16 the dayOfYear would be 16.

How can I fix the parsing to work or how can I extract the whole field to parse out the date/time later?

Bye for now,l


Uploaded Images


------------------
Talend Version - TIS 4.1.2
Generated Code - Java
OS - WinXP SP3 / Linux

Offline

#2 2009-03-30 06:13:43

tnewman
Member
Company: Lunexa
Registered: 2008-11-15
Posts: 194
Website

Re: xml tfileinput parsing question

Hi,

Solved it - use [1] in xml expression/ See image.


Uploaded Images


------------------
Talend Version - TIS 4.1.2
Generated Code - Java
OS - WinXP SP3 / Linux

Offline

#3 2009-03-30 08:38:58

shong
Talend team
Registered: 2007-08-29
Posts: 10357
Website

Re: xml tfileinput parsing question

Hello

<StartPrecal dayOfYear="15">2009-01-15T14:10:00.000</StartPrecal>

StartPrecal is a element node and dayOfYear is a attribute node. 2009-01-15T14:10:00.000 is the value of StartPrecal element, 15 is the value of dayOfYear attribute. To get '2009-01-15T14:10:00.000', you should set StartPrecal as relative xpath.

Best regards

         shong


Uploaded Images


Email:shong@talend.com
Choose Talend, Enjoy Talend!
New & Event: Talend Help Center
Talend-->the leader of open source data management and application integration solutions!

Offline

  • Index
  •  » Talend Open Studio for Data Integration » Usage, Operation
  •  » xml tfileinput parsing question

Board footer

Powered by FluxBB