QX.js Scripting Guide

Working with Layouts

QXML for layout

The <qx-layout> node contains following attributes:

Attribute 

Value

Description

 

layout-name

text

Name of active layout

 

layout-id

number

Unique ID of active layout as generated by QuarkXPress

 

layout-type

 

 

print|digital

 

 

Layout type of active layout 

 

print

Layout of type Print

digital

Layout of type Digital

Getting the QXML DOM for active layout

The first step in writing a script is to retrieve the QXML DOM. The QXML DOM for the active layout can be retrieved using the API method app.activeLayoutDOM()

With root note <qx-layout>,  app.activeLayoutDOM() returns the complete DOM of the active layout including all layers, spreads, pages and boxes along with content of all boxes.