XML input script file structure | HCL Digital Experience
When you use the XML configuration interface command line client, the XML script you use specifies the root element, the XML schema, the portal resources, and actions to be performed.
The main level structure of an XML request or response is always as follows:
<?xml version="1.0" encoding="UTF-8"?>
<request
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
xsi:noNamespaceSchemaLocation="PortalConfig_8.5.0.xsd"
type="export|update">
<portal . . . >
definition of configuration parts to be exported or updated
</portal>
<status . . . >
success or failure indication for the processing
</status>
</request>
PortalConfig_8.5.0.xsd
. All XML
requests must conform to this schema. For your reference, you can
find the schema declaration in the JAR file wp.xml.jar under
the location com/ibm/wps/command/xml/PortalConfig_8.5.0.xsd
. The JAR
file wp.xml.jar is located under the following
directory:- For UNIX™Linux™:
PortalServer_root/base/wp.xml/shared/app
- For z/OS®:
PortalServer_root/base/wp.xml/shared/app
- For IBM® i:
PortalServer_root/base/wp.xml/shared/app
- For Windows™:
PortalServer_root\base\wp.xml\shared\app
- For UNIX™Linux™:
PortalServer_root/doc/xml-samples
- For z/OS®:
PortalServer_root/doc/xml-samples
- For IBM® i:
PortalServer_root/doc/xml-samples
- For Windows™:
PortalServer_root\doc\xml-samples
The type attribute indicates whether the XML request contains specifications for exporting or for updating portal resources.
The portal section describes the parts of the portal configuration that should be exported or updated. The contents of the hierarchy used are described in more detail in the following sections.
The status section is optional; in an XML response it indicates success or failure of the requested operation. If a status element is present in a XML request, the server simply ignores it.
The simplest request that you can send to a server is the following:
<?xml version="1.0" encoding="UTF-8"?>
<request xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
xsi:noNamespaceSchemaLocation="PortalConfig_8.5.0.xsd"
type="export">
<portal action="export"/>
</request>
This request exports the entire configuration of the portal. You can look at the contents of the response to see how the configuration of individual portal resources, such as portlets or pages, is represented in XML elements and attributes.
Additional
to the export
and update
request
types, a third request type export-orphaned-data
is
available for the special scenario of preparing the deletion of orphaned
data.