This document describes how to define a variable name in the XML path
to extract XML data with the Extract XML Document Data step in
an IP Contact Center (IPCC) Express environment.
Readers of this document should have knowledge of these topics:
The information in this document is based on these software and
The information in this document was created from the devices in a
specific lab environment. All of the devices used in this document started with
a cleared (default) configuration. If your network is live, make sure that you
understand the potential impact of any command.
Refer to the
Technical Tips Conventions for more information on document
Use the Extract XML Document Data step after the
Create XML Document step to find data from a document
formatted with XML. Figure 1 represents the step
Note: This only serves as an example.
Figure 1—Sequence of Extracting XML Document
Complete these steps to use the Extract XML Document customized window
in order to obtain data, as Figure
Select the variable that stores the data from the Result Data
Enter the XML path directly or take one of these actions in the XML
Figure 2—Extract XML Document Data
Select the variable that stores the source document from the
Document drop-down menu.
The Extract XML Document Data only applies to a
document created by the Create XML Document step. Otherwise,
You must execute a separate Extract XML Document Data
step for each field in the XML file.
If the XML document contains the content in this output, you need to
configure the Expression Editor for the Extract XML
Document Data step as Figure 3 shows in
order to extract the value of the Last node. The exact XML
path is indicated by the A arrow. The B arrow points to the location where the
XML path should be entered.
Figure 3—Expression Editor - Extract XML Document
<?xml version="1.0" standalone="yes"?>
<STOCK symbol="MSFT" error="0">
Complete these steps if MSFT is specified as a
variable name of the symbol in the XML path:
Define X as a string variable.
Set X = "MSFT"
Specify the XML path value in the Extract XML Document Data step
"/descendant::STOCKLIST/child::STOCK[attribute::symbol='" + X + "']/child::LAST"
When you compare the XML path in Figure
3, MSFT is replaced by + X + in the
XML path by this method.