Write table to XML

Post questions here relative to DataStage Server Edition for such areas as Server job design, DS Basic, Routines, Job Sequences, etc.

Moderators: chulett, rschirm, roy

Post Reply
vinay_renu2001
Participant
Posts: 46
Joined: Wed Sep 28, 2005 9:24 am

Write table to XML

Post by vinay_renu2001 »

hi

I am trying to dump the table data to an xml file and I gave xpath defination also in the xml output stage but it is throwing me an error "Derivation rule "Table_Name/Field_name" is invalid. Message = "'/' expected at "/"""

Can some body help me pls


Thanks
Thanks and Regards
Vin
chulett
Charter Member
Charter Member
Posts: 43085
Joined: Tue Nov 12, 2002 4:34 pm
Location: Denver, CO

Post by chulett »

Not really as that's not alot of information to go on. :?

Do you have an xsd for your target xml? Have you imported the metadata for your xml target into DataStage so that it generated the proper XPath expressions for you or did you whip them up yourself?

Doing that (letting DS generate the XPath expressions for you) will go a long way towards achieving this goal. You would then load that metadata into the XML Output stage and it would do (basically) the rest automagically.
-craig

"You can never have too many knives" -- Logan Nine Fingers
vsi
Premium Member
Premium Member
Posts: 507
Joined: Wed Mar 15, 2006 1:44 pm

same problem

Post by vsi »

Hi
i have imported table defination of XML file using DS XML metadata Importer and getting this eror

" Xalan warning (publicId: , systemId: , line: 0, column: 0): An exception occurred! Type:RuntimeException, Message:Warning: The primary document entity could not be opened. Id=file1.xsd"

After importing I edited the data to remove namespace ,is that causing a problem

Thanks in Advance
chulett
Charter Member
Charter Member
Posts: 43085
Joined: Tue Nov 12, 2002 4:34 pm
Location: Denver, CO

Post by chulett »

Is this a continuation of the original problem or a high-jacking attempt? :?

It is saying it can't find the .xsd you mentioned somewhere, did you ask it to validate?
-craig

"You can never have too many knives" -- Logan Nine Fingers
MarkStewart
Participant
Posts: 17
Joined: Mon Nov 28, 2005 12:44 pm
Contact:

Post by MarkStewart »

You need to ensure that your XML XPath is defined in the description of the column. It defaults to the column information it gets from the database. Change that to be the XPath.

Example:

PK_KEY NUMBER(5)

Change to...

PK_KEY /ROOT/PK_KEY/text()
Mark Stewart
Business Intelligence
Post Reply