Hello All,
I am trying to read from a xml file and load the data into SQL Server.
My job design is as follows.
External Source Stage -> XML Input Stage -> Transformer -> ODBC
Here, the problem is the data in table is entered along with the XML Tags
Eg: <Name>Meena</Name>
<DOB> 21121986 </DOB>
In the target table columns are Name, and DOB. The data entered looks like
Name, DOB
<Name>Meena</Name>, <DOB> 21121986 </DOB>
Please help on how to remove the tags in the target data
Thanks
Working with XML
Moderators: chulett, rschirm, roy
Look at the output link of your XML Input Stage.....go to the Descriptions of each column..... chances are, the elements you are retrieving are missing the final /text() from the xpath syntax. Without the "text()" it means "get the whole element".......
....so it should be .../.../.../DOB/text() ...and so forth.
Ernie
....so it should be .../.../.../DOB/text() ...and so forth.
Ernie
Ernie Ostic
blogit!
<a href="https://dsrealtime.wordpress.com/2015/0 ... ere/">Open IGC is Here!</a>
blogit!
<a href="https://dsrealtime.wordpress.com/2015/0 ... ere/">Open IGC is Here!</a>
-
- Premium Member
- Posts: 258
- Joined: Tue Jul 04, 2006 10:35 pm
- Location: Toronto
Re: Working with XML
while giving the XPATH derivations
give /Name/text() and /DOB/text().
this will get only teh data and no tags.
give /Name/text() and /DOB/text().
this will get only teh data and no tags.
Thanks a lot friends ! It worked !eostic wrote:Look at the output link of your XML Input Stage.....go to the Descriptions of each column..... chances are, the elements you are retrieving are missing the final /text() from the xpath syntax. Without the "text()" it means "get the whole element".......
....so it should be .../.../.../DOB/text() ...and so forth.
Ernie