[resolved] tFileInputMSXML

One Star

[resolved] tFileInputMSXML

Hi !
I tried to use tFileInputMSXML component. I created an xml file :
<root>
<book>
<bookRec>livre 1</bookRec>
<bookRec>livre 2</bookRec>
<bookRec>livre 3</bookRec>
<bookRec>livre 4</bookRec>
</book>
<disk>
<DiskRec>disk 1</DiskRec>
<DiskRec>disk 2</DiskRec>
<DiskRec>disk 3</DiskRec>
<DiskRec>disk 4</DiskRec>
<DiskRec>disk 5</DiskRec>
</disk>
</root>
I did like in the documentation (components RG_314_fr.pdf), p. 492 -> 494) and I have nothing in the log... What is the problem ?
And now, if I have this structure, is it also possible (in fact, tag disk may exist, it is not mandatory) ?? :
<root>
<book>
<bookRec>livre 1</bookRec>
<bookRec>livre 2</bookRec>
<bookRec>livre 3</bookRec>
<bookRec>livre 4</bookRec>
<disk>
<DiskRec>disk 1</DiskRec>
<DiskRec>disk 2</DiskRec>
<DiskRec>disk 3</DiskRec>
<DiskRec>disk 4</DiskRec>
<DiskRec>disk 5</DiskRec>
</disk>
</book>
<book>
<bookRec>livre 10</bookRec>
<bookRec>livre 11</bookRec>
<bookRec>livre 12</bookRec>
<bookRec>livre 13</bookRec>
</book>
<book>
<bookRec>livre 20</bookRec>
<bookRec>livre 21</bookRec>
<bookRec>livre 22</bookRec>
<bookRec>livre 23</bookRec>
<disk>
<DiskRec>disk 10</DiskRec>
<DiskRec>disk 11</DiskRec>
<DiskRec>disk 12</DiskRec>
<DiskRec>disk 13</DiskRec>
<DiskRec>disk 14</DiskRec>
</disk>
</book>
</root>

Thanks a lot for your help.
Kim

Accepted Solutions
Community Manager

Re: [resolved] tFileInputMSXML

Hello All
tFileInputMSXML does't support this format of xml file, here is an example:
in.xml:

<root>
<subRoot>

<book>
<bookRec1>livre 1</bookRec1>
<bookRec2>livre 2</bookRec2>
<bookRec3>livre 3</bookRec3>
<bookRec4>livre 4</bookRec4>

</book>
<disk>
<DiskRec1>disk 1</DiskRec1>
<DiskRec2>disk 2</DiskRec2>
<DiskRec3>disk 3</DiskRec3>
<DiskRec4>disk 4</DiskRec4>

</disk>

</subRoot>
<subRoot>
<book>
<bookRec1>livre 11</bookRec1>
<bookRec2>livre 22</bookRec2>
<bookRec3>livre 33</bookRec3>
<bookRec4>livre 44</bookRec4>
</book>
<disk>

<DiskRec1>disk 11</DiskRec1>
<DiskRec2>disk 22</DiskRec2>
<DiskRec3>disk 33</DiskRec3>
<DiskRec4>disk 44</DiskRec4>


</disk>
</subRoot>
</root>

Result:
Starting job forum7779 at 15:29 14/08/2009.
connecting to socket on port 3649
connected
.--------+--------+--------+--------.
| tLogRow_1 |
|=-------+--------+--------+-------=|
|bookrec1|bookrec2|bookrec3|bookrec4|
|=-------+--------+--------+-------=|
|livre 1 |livre 2 |livre 3 |livre 4 |
|livre 11|livre 22|livre 33|livre 44|
'--------+--------+--------+--------'
.--------+--------+--------+--------.
| tLogRow_3 |
|=-------+--------+--------+-------=|
|DiskRec1|DiskRec2|DiskRec3|DiskRec4|
|=-------+--------+--------+-------=|
|disk 1 |disk 2 |disk 3 |disk 4 |
|disk 11 |disk 22 |disk 33 |disk 44 |
'--------+--------+--------+--------'
disconnected
Job forum7779 ended at 15:29 14/08/2009.

Best regards

shong
----------------------------------------------------------
Talend | Data Agility for Modern Business

All Replies
One Star

Re: [resolved] tFileInputMSXML

You got the book example to compile? Lucky you --- could you please have a look at http://www.talendforge.org/forum/viewtopic.php?id=7783 and tell me what I've missed out? I'd really apreciate it...
Kind regards,
Mihai
One Star

Re: [resolved] tFileInputMSXML

Hi Mihai !
I haven't got the example. I just tried to copy the code from the pdf. I'm not able to get a result...
This component seems to be cool, but how to use it ???
I have not good response about that !!!
Bye
Kim
Community Manager

Re: [resolved] tFileInputMSXML

Hello All
tFileInputMSXML does't support this format of xml file, here is an example:
in.xml:

<root>
<subRoot>

<book>
<bookRec1>livre 1</bookRec1>
<bookRec2>livre 2</bookRec2>
<bookRec3>livre 3</bookRec3>
<bookRec4>livre 4</bookRec4>

</book>
<disk>
<DiskRec1>disk 1</DiskRec1>
<DiskRec2>disk 2</DiskRec2>
<DiskRec3>disk 3</DiskRec3>
<DiskRec4>disk 4</DiskRec4>

</disk>

</subRoot>
<subRoot>
<book>
<bookRec1>livre 11</bookRec1>
<bookRec2>livre 22</bookRec2>
<bookRec3>livre 33</bookRec3>
<bookRec4>livre 44</bookRec4>
</book>
<disk>

<DiskRec1>disk 11</DiskRec1>
<DiskRec2>disk 22</DiskRec2>
<DiskRec3>disk 33</DiskRec3>
<DiskRec4>disk 44</DiskRec4>


</disk>
</subRoot>
</root>

Result:
Starting job forum7779 at 15:29 14/08/2009.
connecting to socket on port 3649
connected
.--------+--------+--------+--------.
| tLogRow_1 |
|=-------+--------+--------+-------=|
|bookrec1|bookrec2|bookrec3|bookrec4|
|=-------+--------+--------+-------=|
|livre 1 |livre 2 |livre 3 |livre 4 |
|livre 11|livre 22|livre 33|livre 44|
'--------+--------+--------+--------'
.--------+--------+--------+--------.
| tLogRow_3 |
|=-------+--------+--------+-------=|
|DiskRec1|DiskRec2|DiskRec3|DiskRec4|
|=-------+--------+--------+-------=|
|disk 1 |disk 2 |disk 3 |disk 4 |
|disk 11 |disk 22 |disk 33 |disk 44 |
'--------+--------+--------+--------'
disconnected
Job forum7779 ended at 15:29 14/08/2009.

Best regards

shong
----------------------------------------------------------
Talend | Data Agility for Modern Business
One Star

Re: [resolved] tFileInputMSXML

Hi Shong !
Thanks a lot for your response.
Have you an idea how to solve my problem with this following xml structure ?
<root>
<book>
<name>livre 1</name>
<date>01.01.2000</date>
</book>
<book>
<name>livre 2</name>
<date>01.01.2002</date>
<author> => this tag is optional and can contain 1 -> n elements
<author1>
<author2>
<author3>
.
.
.
<author n>
</author>
</book>
<book>
<name>livre 3</name>
<date>01.01.2004</date>
</book>
<book>
<name>livre 4</name>
<date>01.01.2005</date>
<author> => this tag is optional and can contain 1 -> n elements
<author1>
<author2>
</author>
</book>
</root>
It's really a big problem for me. I'm looking for a solution, but nothing at this time......
Thanks a lot for your response.
Kim
Community Manager

Re: [resolved] tFileInputMSXML

Hello Kim
Which value of elements do you want to extract from the file?
Best regards

shong
----------------------------------------------------------
Talend | Data Agility for Modern Business
One Star

Re: [resolved] tFileInputMSXML

Hi Shong !
If I could extract the contain of book (name, date ...) and author (author1, author2, ... author n) (in fact, all tags) ... it could be heaven ;-)
Kim
One Star

Re: [resolved] tFileInputMSXML

Hello,
i have the same problem with a similar XML structure;
<root>
<actions>
<item>
<description>
</item>
<item>
<description>
</item>

</actions>
<analysis>
<item>
<description>
</item>
<item>
<description>
</item>

</analysis>
</root>
Is there a way to get the list of action and analysis description with a single InputMSXML component?
If I set those parameters below, I get the list of "actions" but how to loop on "analysis" at the same time?
XPath root: /root/actions
XPath loop: item
XPath element: description
Thank you very much.
Sami
One Star

Re: [resolved] tFileInputMSXML

Hello,
i have the same problem with a similar XML structure;
<root>
<actions>
<item>
<description>
</item>
<item>
<description>
</item>

</actions>
<analysis>
<item>
<description>
</item>
<item>
<description>
</item>

</analysis>
</root>
Is there a way to get the list of action and analysis description with a single InputMSXML component?
If I set those parameters below, I get the list of "actions" but how to loop on "analysis" at the same time?
XPath root: /root/actions
XPath loop: item
XPath element: description
Thank you very much.
Sami
One Star

Re: [resolved] tFileInputMSXML

Hello All
tFileInputMSXML does't support this format of xml file, here is an example:
in.xml:

<root>
<subRoot>

<book>
<bookRec1>livre 1</bookRec1>
<bookRec2>livre 2</bookRec2>
<bookRec3>livre 3</bookRec3>
<bookRec4>livre 4</bookRec4>

</book>
<disk>
<DiskRec1>disk 1</DiskRec1>
<DiskRec2>disk 2</DiskRec2>
<DiskRec3>disk 3</DiskRec3>
<DiskRec4>disk 4</DiskRec4>

</disk>

</subRoot>
<subRoot>
<book>
<bookRec1>livre 11</bookRec1>
<bookRec2>livre 22</bookRec2>
<bookRec3>livre 33</bookRec3>
<bookRec4>livre 44</bookRec4>
</book>
<disk>

<DiskRec1>disk 11</DiskRec1>
<DiskRec2>disk 22</DiskRec2>
<DiskRec3>disk 33</DiskRec3>
<DiskRec4>disk 44</DiskRec4>


</disk>
</subRoot>
</root>

Result:
Starting job forum7779 at 15:29 14/08/2009.
connecting to socket on port 3649
connected
.--------+--------+--------+--------.
| tLogRow_1 |
|=-------+--------+--------+-------=|
|bookrec1|bookrec2|bookrec3|bookrec4|
|=-------+--------+--------+-------=|
|livre 1 |livre 2 |livre 3 |livre 4 |
|livre 11|livre 22|livre 33|livre 44|
'--------+--------+--------+--------'
.--------+--------+--------+--------.
| tLogRow_3 |
|=-------+--------+--------+-------=|
|DiskRec1|DiskRec2|DiskRec3|DiskRec4|
|=-------+--------+--------+-------=|
|disk 1 |disk 2 |disk 3 |disk 4 |
|disk 11 |disk 22 |disk 33 |disk 44 |
'--------+--------+--------+--------'
disconnected
Job forum7779 ended at 15:29 14/08/2009.

Best regards

shong

Hello Shong
Thanks for this reply, it's better than "Components.pdf" Smiley Happy
By the way <subRoot> is not mandatory.
Regards
Community Manager

Re: [resolved] tFileInputMSXML

Thanks for this reply, it's better than "Components.pdf" Smiley Happy

Regards

Thank you! Smiley Wink Samos
----------------------------------------------------------
Talend | Data Agility for Modern Business