Changing a document node name at run time

Greetings,

Is there an easier way to change the name of a document node during run time besides converting the document to an XML string and doing a string replace?

I have this document (xml representation):

<command>abc</command>

and I want it to look like this:

<read>abc</read>

Any help would be appreciated.

Thanks.

Here’s an approach that may work for you:

  • Convert the node to an IS document.

  • Map command to read then drop command. How you need to do this will depend upon if a document type is being used and that type does not define the read field.

  • Instead of mapping, create a Java service that accepts the document, the source and target names and then use IDataUtil methods to get the command value, remove the command field and then put the read field/value.