2020

Table Of Contents
USING QUARKXPRESS SERVER
Importing XML with placeholders
This topic explains how to import XML data into boxes using QuarkXPress
placeholders.
To use this feature, you must have a QuarkXPress project that has been set up with
placeholders that correspond to the element types in a source XML file. For more
information, see A Guide to XML Import.
URL will cause the saved-as file to replace any existing file with the same
name.http://localhost:8080/saveas/pdf/sample.qxp?
newname=Customer1&path=HDD:temp&savetopool=true
Example, object
model
Request object name: SaveAsRequestcom.quark.qxpsm.QRequestContext
rc = new com.quark.qxpsm.QRequestContext();
if(!this.DocumentSettings1.documentName.Text.Equals(“”))
rc.documentName = this.DocumentSettings1.documentName.Text; //
STEP 2 (SPECIFIC TO REQUESTS): // Create the Save as request and chain
it to the document context SaveAsRequest saveasreq = new
SaveAsRequest(); saveasreq.newName = this.newname.Text;
if((this.path.Text != null) && (!this.path.Text.Equals(“”)))
saveasreq.newFilePath = this.path.Text; saveasreq.replaceFile =
this.replace.Checked.ToString(); saveasreq.saveToPool =
this.savetopool.Checked.ToString(); rc.request = saveasreq; // Create the
service and call it with QRequestContext object RequestService svc = new
RequestService(); com.quark.qxpsm.QContentData qc =
svc.processRequest(rc);
Parameters
thexmldoc XML
Lets you specify the
XML file containing
the data to import.
The path can be
absolute or relative to
the location of the
XML file. You can also
supply XML as a
string.
layout String
Lets you specify which
layout to render. The
first layout is layout 1.
You can also specify a
layout by name.
paginate XML
Lets you specify the
XML file containing
the data to import.
The paginate
parameter reates
enough pages in the
target layout to
accommodate the
98 | A GUIDE TO QUARKXPRESS SERVER 2020