Converting a flat XML to structured XML

A powerful feature of the HCL OneTest™ API message editor is the ability to enter XML in String type fields and then edit the XML in a structured way.
Restriction: The performance of the Field Editor (shown) is degraded if a single line of XML is larger than 50,000 bytes. This is not an issue if the XML is on multiple lines.

In the following example, a field named xmlDocument of type String is created, and some XML entered in the field editor as its content.

Clicking OK saves the changes, leaving the message structure like the following.

This tree can then be manipulated in the usual way; selecting Expand All from the menu yields the following.

Note: When you are expanding all nodes in large messages, HCL OneTest™ API processes the message for up to 5 seconds. After that time, all nodes that could be expanded will be expanded. If necessary, you can expand again to continue expanding any collapsed nodes.

The message hierarchy can now be edited as normal XML. Each individual node within its structure can now be manipulated by the field editor.

If your content follows the XML structure but you must manipulate it in a plain text manner, right-click the base element and select Contents > Treat as plain text.

Feedback