News + Events

Find out what's happening.

Unprettify CXML code in Oxygen XML Editor

Peter Kahrel
Scripting Engineer, Typefi

XML and CXML code, when seen as one long string, is pretty unintelligible.

In Oxygen XML Editor you can make that code readable by prettifying it (Oxygen calls it ‘Format and indent’). That’s very useful, but the problem is that because of whitespace issues you can’t edit the code, save it, and use it in a Typefi job.

To use a formatted and edited CXML file in a Typefi job, you’d have to unprettify it to remove all the indents and line breaks. But, strangely, Oxygen doesn’t have such a function. However, you can unprettify prettified code with a simple find-and-replace operation.

To remove the added indents and line breaks, open Oxygen’s Find/Replace window.

In the Options panel, tick the Regular expression checkbox. Then in the Find field, enter this search expression:

[\n\r]\s+([ >])

In the Replace with field, enter:

$1

Click OK to run the replacement.

× Shopping Cart

Your cart is empty.