Posted: Mon May 17, 2004 12:47 am Post subject: Changing XML tags
Voyager
Joined: 24 Nov 2003 Posts: 79 Location: UK
I have an XML message in the format InputBody.B.C.XYZ. I want to change the middle part of the tag to OutputRoot.XML.D.E.XYZ.
Is it possible to change the tag or do I have to create a new one and set it equal to the old value. I have tried using FIELDNAME, but it seems although you can retrieve this value you cannot set it to be a different value.
I have managed to change the tag successfully using the cardinality function however i do need to go a step further and try and have the output as an attribute of in the input xml eg
Set j = Cardinality(InputBody.tagA.tagB.*[]);
SEt n = 1;
While n <= j do
Set OutputRoot.XML.newTag.(XML.attr)[n] = InputBody.tagA.tagB.[n];
SET n = n +1;
END WHILE;
You cannot post new topics in this forum You cannot reply to topics in this forum You cannot edit your posts in this forum You cannot delete your posts in this forum You cannot vote in polls in this forum