Page 1 of 1

Write table to XML

Posted: Mon Oct 09, 2006 7:13 pm
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

Posted: Mon Oct 09, 2006 8:10 pm
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.

same problem

Posted: Mon Oct 09, 2006 11:04 pm
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

Posted: Mon Oct 09, 2006 11:56 pm
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?

Posted: Fri Oct 13, 2006 9:03 am
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()