Page 1 of 1

How can I extract just the values from xml file???

Posted: Wed Sep 24, 2008 1:35 am
by ICE
Dear All,

May I know whether I can extract the values excluding the tags(column) name which I already imported in the xml table metadata definition as column name?
If can, may I know how to do it?
My current job design is as follows:
Folder -> XML reader -> sequential file.

Folder stage can read all the *.xml files from that specific folder.
But XML reader extract the xml file column value together with tag(column) name. For example: <lworkstationNmbr>1</lworkstationNmbr>
In that case, I want only the value which is 1. I don't want the tag name.
May I know whether I can do it or not and if yes, how to do it???
Anyone can help me please???

Thank you for your time,

Regards,

Posted: Wed Sep 24, 2008 1:59 am
by WoMaWil
on your distribution CD there are same sample XML-files and jobs. Looking them through is very helpful. Thereafter you are surely able to do your job

Posted: Wed Sep 24, 2008 2:25 am
by ICE
Dear WoMaWil,

I setup that example. There are 5 sample jobs. Right? I already checked all that sample jobs and powerpoint explanation but I wasn't got the solution from there. I also couldn't run those sample jobs :(
I got this my job design from that sample Ex4. But the required result wasn't that I wanted and I also don't know what are the actual output for that sample job. That's why I need your help. I also went through some help file from DSJ help but I still do not very clear :P

Thank you so much for your time.
Is there anyone can help me pls???

Thank you


WoMaWil wrote:on your distribution CD there are same sample XML-files and jobs. Looking them through is very helpful. Thereafter you are surely able to do your job

Posted: Wed Sep 24, 2008 4:03 am
by arunkumarmm
Try modifying your X Path.

Posted: Wed Sep 24, 2008 7:51 pm
by ICE
Dear arunkumarmm,

May I know where can I find it and how to do it?
I saw the XPath in help but I don't see in my job :(
I don't see enough help info for XML input stage and XML Reader. Is there any other help file for XMLInput and XML Reader stages???
Thank you so much for your help.


Thanks,
ICE

arunkumarmm wrote:Try modifying your X Path.

Posted: Wed Sep 24, 2008 9:21 pm
by chulett
The XML Reader stage is old and has been deprecated. Use the XML Input stage now instead.

For documentation there is an XML PACK pdf file in your 'Docs' directory. And an XML Best Practices writeup on Kim Duke's website.

ps. The XPath Expression is stored in the 'Description' field in the XML stages.

Posted: Wed Sep 24, 2008 9:41 pm
by ICE
Dear chulett,

Ok. Let me find more help forXMLiinput stage.
Thank you so much for your information.

Thanks,

chulett wrote:The XML Reader stage is old and has been deprecated. Use the XML Input stage now instead.

For documentation there is an XML PACK pdf file in your 'Docs' directory. And an XML Best Practices writeup on Kim Duke's website.

ps. The XPath Expression is stored in the 'Description' field in the XML stages.

Posted: Thu Sep 25, 2008 1:12 am
by ICE
Dear Chulett,

I define the XPath as TAS/NEW_TA/FOOTER/@lTaNmbr to get the value of that column lTaNmbr but there is null value result. Actually those column has value. I also define the XPath in Derivation column but it doesn't work :(
Is there any idea for this problem???


Thanks,

chulett wrote:The XML Reader stage is old and has been deprecated. Use the XML Input stage now instead.

For documentation there is an XML PACK pdf file in your 'Docs' directory. And an XML Best Practices writeup on Kim Duke's website.

ps. The XPath Expression is stored in the 'Description' field in the XML stages.

Posted: Thu Sep 25, 2008 5:57 am
by eostic
The XPath is the route that you would take, element by element, if you are "walking" thru the XML document to reach the desired value.... you should be starting it with the /, so /TAS would be the first part, and this means that <TAS> must also be the root element of your document....check this, and the spelling. Your actual column as specified below @ITaNmbr is an "attribute", which means in the xml document it should be found as ITaNmbr="some value".... if that is not the case, then you need alternate syntax (if ITaNmbr is an element, like <ITaNmbr> then you would need .../ITaNmbr/text() in your XPath syntax in the Description property of the column on your output link.

There is more to the XMLInput Stage....spelling errors, incorrect paths, wrong repetition element --- they can all result in retrieval issues. Do some searches in the forum, get the XML Best Practices document as noted in other threads, and use a simple example...

Ernie

Posted: Wed Nov 12, 2008 7:42 pm
by Nagaraj
Can anyone send me XML Presentations which you have or any docs associated with that,
Actually i am starting a new project on XML, this would a great help
if anyone of you could send me these docs and pdfs.

Thanks

Posted: Wed Nov 12, 2008 11:43 pm
by chulett
chulett wrote:For documentation there is an XML PACK pdf file in your 'Docs' directory. And an XML Best Practices writeup on Kim Duke's website.
There ya go.

Posted: Thu Nov 13, 2008 12:40 am
by Nagaraj
Thanks for the information.