Getting a XML file as output

Formally known as "Mercator Inside Integrator 6.7", DataStage TX enables high-volume, complex transactions without the need for additional coding.

Moderators: chulett, rschirm

Post Reply
Sne
Participant
Posts: 5
Joined: Wed Mar 14, 2007 4:56 am

Getting a XML file as output

Post by Sne »

I am getting data from a SP and then converting it to XML. what all setting should be done to get the output as XML instead of text file :?:
janhess
Participant
Posts: 201
Joined: Thu Sep 18, 2003 2:18 am
Location: UK

Post by janhess »

XML is text. What exactly do you want?
Sne
Participant
Posts: 5
Joined: Wed Mar 14, 2007 4:56 am

Post by Sne »

I want in the format of XML tags
EG:

<header>
<body>
</body>
</header>
Sne
Participant
Posts: 5
Joined: Wed Mar 14, 2007 4:56 am

Post by Sne »

Sorry For the previous reply!! :oops:

I want the file along with the XML tags. For Ex.

<header>
<body>
<tag1>data</tag1>
<tag2>data</tag2>
</body>
</header>
janhess
Participant
Posts: 201
Joined: Thu Sep 18, 2003 2:18 am
Location: UK

Post by janhess »

If you have an xsd or dtd for the xml, import it into type designer.
If it;s as simple as your example then use the start and end tags as initiators and terminators.
You could generate xsd from something like XMLSpy.
Sne
Participant
Posts: 5
Joined: Wed Mar 14, 2007 4:56 am

Post by Sne »

Hi,

The solution that you have suggested can be used if the type tree imported is used at input side.

My problem is, I am having a normal type tree which is used at the output side in the map, and I need to set some properties so that I will get the output as XML file. (that is data along with
XML tags).

The other problem is that my ex is much more complex than one that is given in Post. So I am afraid I wont be able to use the tags as initiators and terminators!!!

Thanks in Advance
janhess
Participant
Posts: 201
Joined: Thu Sep 18, 2003 2:18 am
Location: UK

Post by janhess »

There is no setting to generate xml. You need a type tree which has the tags set as initiators/terminators. As I said before it's best to import an xml schema (xsd) or xml DTD into your Type Designer to generate the type tree for the XML.
Look in Examples folder of software and look for example under xml folder.
jgibby
Participant
Posts: 42
Joined: Thu Dec 16, 2004 8:48 am

Post by jgibby »

Sne wrote:Hi,

The solution that you have suggested can be used if the type tree imported is used at input side.
Importing a DTD/XSD into the Type Tree Designer does not force that type tree to be an *Input* type tree only. A Type Tree is capable of being used both as input and as output. Jan is correct. Import the DTD or XSD of your xml (create one if you have to with XMLSpy or other tool) and then create your output card, specifying your new XML Type Tree. You will then only need to specify the values and when the Output Card puts the data on the adapter to write it out, it will format it as XML.

John
"Artificial intelligience is no match for natural stupidity."
Post Reply