XML

Post questions here relative to DataStage Enterprise/PX Edition for such areas as Parallel job design, Parallel datasets, BuildOps, Wrappers, etc.

Moderators: chulett, rschirm, roy

Post Reply
mannu
Participant
Posts: 10
Joined: Wed Jan 20, 2010 6:25 pm

XML

Post by mannu »

Hi friends,

I am new to XML and have a requirement where I need to Publish 1000 recodrs and 70 column data from a single flatfile/database into an XML file.I don't have any other information as how the XML document should look like apart from flat file.so i used XML o/p stage. But in o/p ,for each column ,i do not want to specify the path manually... is there any to produce these XPaths in GUI given I just have all the records in .txt file .
for eg : in XMP o/p stage and in o/p page
col.A-varchar(50)-/customer/A/text()
col.B-char(10)-/customer/B/text()
In the above scenario, i don't want to manually type these path info for all 70 column?

Thank you.
hello
anbu
Premium Member
Premium Member
Posts: 596
Joined: Sat Feb 18, 2006 2:25 am
Location: india

Post by anbu »

Use XML metadata importer to import the metadata from your XML file
You are the creator of your destiny - Swami Vivekananda
chulett
Charter Member
Charter Member
Posts: 43085
Joined: Tue Nov 12, 2002 4:34 pm
Location: Denver, CO

Post by chulett »

Best if you can get an xsd from whomever produced that file and import the metadata from that, but worst case you can use the XML as noted. Hopefully it is a complete representation of what your files will look like in the long run.
-craig

"You can never have too many knives" -- Logan Nine Fingers
Sreenivasulu
Premium Member
Premium Member
Posts: 892
Joined: Thu Oct 16, 2003 5:18 am

Post by Sreenivasulu »

You can generate the XSD from the xml file using xmlspy,xmlmarker etc

Regards
Sreeni
ersunnys
Participant
Posts: 29
Joined: Wed Sep 13, 2006 1:39 pm
Location: Singapore

Post by ersunnys »

Mannu,

What I understood from your query is, target XML structure is not yet finalize (or could be Dynamic) but you want to give XML structure at run time...

For this, use XML Transform stage after XML Output stage and use XSL to write the structure of XML. You can modify this XSL anytime without touching the code and the XML output will be as per defined in XSL...
Regards,
Sunny Sharma.
Post Reply