Page 1 of 1

xml writer

Posted: Wed Oct 26, 2005 1:24 pm
by shivan
Hi,
I am taking a code from an xml file using xml reader. Then i use a transformer to modify the hexadecimal values. Then load it in the xml writer. From xml writer i send it to the sequential file. Where i load this file back as .xml file with tags.

Basically what i want to do is:
Get an xml file , correct some data in it and put it back in the server in the same format.

thanks
shivan

Posted: Wed Oct 26, 2005 4:01 pm
by ray.wurlod
You have not actually asked a question. What it is you want to know? Whether your design is sound? How to convert hexadecimal data?

Posted: Wed Oct 26, 2005 9:06 pm
by vmcburney
This is one of those rare cases where it might be a lot easier (and definitely a lot faster) to read and write the XML using sequential file stages instead of XML Input and XML Output. If you are simply reading a numeric value, changing it and writing it back again the XML parsing within a transformer becomes very easy. If the XML tag matches the numeric field you are looking for you use a couple stage variables and a routine to change it. Otherwise you pass it straight through unchanged. Not much risk of corrupting the XML.

If you tried using an XML Input and XML Output stage there is a very high likelyhood that your output XML was different to your input XML with DataStage trying to flatten the XML structure and possibly changing XML syntax on you.